5 ms·
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.
by jbrichter 12y 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.
- HerrMonnezza 12y agoIt 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.
- shele 12y agoIt is nice to see how Julia circumvents the problem by introducing a macro @printf. See http://stackoverflow.com/questions/19783030/in-julia-why-is-printf-a-macro-instead-of-a-function http://stackoverflow.com/questions/19783030/in-julia-why-is-...