Replacing strtod #437
Replies: 1 comment
-
Yeah this will probably happen at some point, the specific algorithm/implementation being an open question. We'd probably need to implement it from scratch as opposed to taking an existing implementation. It's a little odd that the first implementation you linked doesn't seem to use a big integer fallback path as I thought this is standard for complex inputs - I didn't think just 128-bit arithmetics suffices, but I haven't studied the state of the art here. The presence of the said fallback was one of the issues wrt code size at least. Either way this needs some research into the state of the art and options wrt performance x code complexity. |
Beta Was this translation helpful? Give feedback.
-
Any plans to replace strtod in luai_str2num with a faster version? I've been recently looking into alternatives (for non Luau related projects) and there are several which claim 4x to 6x performance.
Some examples, not sure if they are absolutely the fastest:
https://github.com/hermantb/fast_convert (6x faster)
https://github.com/fastfloat/fast_float (4x faster)
Beta Was this translation helpful? Give feedback.
All reactions