-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
kind: enhancement/improvementstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Description
The dump_integer function is naive custom code and the dump_float function uses a Grisu2 implementation. This leaves a lot of room for improvements.
In C++17, we could use <charconv>'s std::to_chars as pointed out by u/STL and live happily ever after. Unfortunately, we are still sticking around with C++11.
Examples for code to try are:
- https://gist.github.com/Veedrac/069dd35f896de4df4e14b881a455ca47 (CC0, see also https://www.reddit.com/r/programming/comments/7ljzty/how_to_print_integers_really_fast_with_source_code/dro1umo)
- https://github.com/ulfjack/ryu (Boost / Apache2)
- https://pvk.ca/Blog/2017/12/22/appnexus-common-framework-its-out-also-how-to-print-integers-faster/ (Apache2)
Maybe there are other projects, too.
It would be great to try different implementations. The largest piece of work should usually be to make it run as single header, and to adjust it to the interface.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind: enhancement/improvementstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated