Hacker News new | ask | show | jobs
by jbrichter 4270 days ago
fscanf has to parse and execute the format string. It might be interesting to compare your custom ascii-to-float converter to one which calls strtof in a loop.
2 comments

It would also be interesting to compare it to C++'s ">>" operators; one of the reasons to introduce them was exactly to avoid run-time parsing of format strings.
It is nice to see how Julia circumvents the problem by introducing a macro @printf. See http://stackoverflow.com/questions/19783030/in-julia-why-is-...