Daniel Lemire's blog

, 3 min read

Converting integers to decimal strings faster with AVX-512

4 thoughts on “Converting integers to decimal strings faster with AVX-512”

  1. Florian Lemaitre says:

    That’s the kind of code that shows AVX512 is worth for regular computing and not only for scientific computing.

    Few people understand SIMD well enough to bring SIMD to “regular problems” that are not crunching numbers. You sir, are one of them, and I’m glad for that.

  2. George Spelvin says:

    Comments on the two code samples:The table would be a lot more comprehensible as static const char table[200] = "0001020304 ... 9899";.Could someone produce a brief outline of the algorithm? In particular, the ifma_const magic values (which I think are 52-bit approximations to 1/10, 1/100, 1/1000, etc.) and the peculiarly non-zero value of zmmzero.

    1. George Spelvin says:

      Sorry for the poor formatting of the above. I had tried to use <ol&gt, but the list tags got stripped.

  3. pzq_alex says:

    How about the reverse operation, i.e. scanning integers from a string? (I’d expect this to be partially answered by the fast_float library. )