4 ms·
All those arithmetic calculations depend on the previous... You should get much more throughput if you can interleave them with other instructions... I wonder
by londons_explore 4y ago
All those arithmetic calculations depend on the previous...
You should get much more throughput if you can interleave them with other instructions...
I wonder if that's what the benchmarks did?
- fanf2 4y agoHmm, yes, there are only 2 or 3 instructions that can execute concurrently - but your observation made me realise I can eke out another by masking is_ascii more thoroughly. Thanks! Bulk throughput isn’t really my aim, it’s just a convenient way to get numbers big enough to be easily measurable :-)
- dzaima 4y agoAn out-of-order CPU will interleave things for you. Any modern CPU should have no issues running many iterations of the loop in parallel, as nothing should depend on the previous iteration. But, given that the task at hand usually deals with very short inputs, there's not much to interleave with anyway.