3 ms·
> it supposedly works well for big blocks these days (>1K or so) but is supposedly slower than register moves for small blocks. On current processors with Fast
by JoshTriplett 6y ago
> it supposedly works well for big blocks these days (>1K or so) but is supposedly slower than register moves for small blocks.
On current processors with Fast Short REP MOVSB (FSRM), REP MOVSB is the fastest method for all sizes. On processors without FSRM, but with ERMS, REP MOVSB is faster for anything longer than ~128 bytes.
- beagle3 6y agoThanks! Is there a simple rule-of-the-thumb about when can one rely on FSRM?
- JoshTriplett 6y agoYou should check the corresponding CPUID bit, but in general, Ice Lake and newer.