opened
quinnj
username_0
Just curious how you generated the two static arrays; I'm playing around with porting the code to Julia and was curious if I could just generate the data instead of hard-coding the arrays.
Code to generate the power_of_ten_components and mantissa arrays?
issue
created
lemire
username_1
It is on my todo to document all of it properly. But I haven't finished yet. I've been working on it. Soon, I will be done. // Keep me posted, I'd love to know how well you fare in Julia.
comment
created
quinnj
username_0
It's gone well! Comparing the code, I realized we both had almost identical fastpaths; but it's the "2nd tier" fastpath that provides the biggest boost to the Parsers.jl algorithm. We also don't have a fallback to `strtod`, but we also have gmp/mpfr in Base julia available for the arbitrary precision cases. Feel free to check out the code here: https://github.com/JuliaData/Parsers.jl/pull/59/files#diff-eab64931093d6c4254a8f9bcc9493b04R368.
comment
created
lemire
username_1
@username_0  I will ping you once I have things properly documented.
comment
created
nigeltao
username_2
I have re-implented this library's algorithm, and my code to generate the tables is here:
https://github.com/google/wuffs/blob/master/script/print-mpb-powers-of-10.go
comment
created
lemire
username_1
Thanks Nigel. More documentation is upcoming from me.
comment
created
lemire
username_1
Please see script in Figure 5 of the following manuscript:

Daniel Lemire, [Number Parsing at a Gigabyte per Second](https://arxiv.org/abs/2101.11408), arXiv:2101.11408

It took a long time, sorry. 

Closing this issue.
comment
closed
lemire
username_1
issue