3 ms·
Tons of classic CISC have strcpy memcpy, memmove, etc implemented as instructions. S/360 and x86 do too. The reason is that the early incarnations didn't have
by monocasa 7y ago
Tons of classic CISC have strcpy memcpy, memmove, etc implemented as instructions. S/360 and x86 do too. The reason is that the early incarnations didn't have instruction caches, so you could get a ton of perf on these common operations by executing the move almost entirely of out of ucode, therby keeping the instruction fetches from conflicting with the data accsesses and stealing bus bandwidth. Like 2x-3x increased bandwidth typically.
- userbinator 7y agoThat's still true with REP MOVS/REP STOS today in x86, it runs in an internal loop (and reads/writes cacheline-sized blocks if it can) while the rest of the CPU can continue executing other instructions in parallel. You can achieve similar results with vector instructions, but those tend to take up a lot of icache and also fetch bandwidth.