Comment by souprock
4 years ago
It's just plain weird that the library would use a generic length function. Might it have something to do with needlessly accepting pathological NaN representations?
The expected code would do something closer to this:
len = strspn(s, "0123456789INFTYAEBCDXPinftyaebcdxp-+.");
That would be optimized to use a bitmap.
No comments yet
Contribute on Hacker News ↗