News for hackers. Stuff that matters.
Re:Parsing integers quickly with AVX-512 by nly on Sunday September 24, 2023 @06:24PM (#37637756)
17 cycles still seems pretty slow compared to the methods explored in this article, which got the result down to 0.75ns (~3 cycles?) (for integer strings of a known length):

https://kholdstare.github.io/technical/2020/05/26/faster-int...

Most of the overhead is found in dealing with variable length input, minus signs, and overflow checking.

Re:Parsing integers quickly with AVX-512 by foota on Sunday September 24, 2023 @06:47PM (#37637908)
I think the technique there is largely covered within the op, but it seems like this may be a somewhat well known technique.
Re:Parsing integers quickly with AVX-512 by kolbe on Sunday September 24, 2023 @11:53PM (#37639528)
I'm guessing the instruction pipeline gets packed, so 4-5x more than 3 cyles.
Re:Parsing integers quickly with AVX-512 by nly on Monday September 25, 2023 @04:27AM (#37640900)
If all you care about is throughput, that's what you want
Re:Parsing integers quickly with AVX-512 by foota on Monday September 25, 2023 @05:49AM (#37641419)
Also, the benchmark of exactly as written there is missing some overhead, as it will always be cached. Memory accesses aren't likely to be an issue here, but I always try to run over a couple dozen or hundred of megs of input in benchmarks to ward against that.