2 ms·
I replicated the tests and discovered kernel/libc are both using rep/mov for the copy so copy-speed isn't the cause of the difference. The cause of the differe
by scaramanga 6y ago
I replicated the tests and discovered kernel/libc are both using rep/mov for the copy so copy-speed isn't the cause of the difference.
The cause of the difference is spectre mitigations which now make system call overhead much higher than it should be. So much so that the cost of the additional pagefaults incurred by the inefficient mmap version get dwarfed.
With mitigations=off they both perform roughly identically.
You could smell a rat anyway because AVX copies may be faster, but not that much faster.