Hacker News new | ask | show | jobs
by ip26 1514 days ago
Is it generally possible to convert rep str sequences to AVX? Could the hardware or compiler already be doing this?

AVX is just the SIMD unit. I would argue the transistors were spent on SIMD, and the hitch is simply the best way to send str commands to the SIMD hardware.

1 comments

Why? IIRC something like 99% of string operations are on 20 chars or less. If you're hitting bottlenecks then optimize.
If you are arguing most string ops have just a few chars and therefore don’t use vectors… why do we need to spend silicon enhancing rep prefix in the first place?