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.
George Spelvinsays:
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.
George Spelvinsays:
Sorry for the poor formatting of the above. I had tried to use <ol>, but the list tags got stripped.
pzq_alexsays:
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. )
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.
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, theifma_const
magic values (which I think are 52-bit approximations to 1/10, 1/100, 1/1000, etc.) and the peculiarly non-zero value ofzmmzero
.Sorry for the poor formatting of the above. I had tried to use
<ol>
, but the list tags got stripped.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. )