Commit 68185ba
committed
opcache: Patch SSE based fast_memcpy() implementation
Use _mm_store_si128() instead of _mm_stream_si128(). This ensures that copied memory
is preserved in data cache, which is good as the interpretor will start to use this
data without the need to go back to memory. _mm_stream* is intended to be used for
stores where we want to avoid reading data into the cache and the cache pollution;
in our scenario it seems that preserving the data in cache has a positive impact.
Tests on WordPress 4.1 show ~1% performance increase with fast_memcpy() in place
versus standard memcpy() when running php-cgi -T10000 wordpress/index.php.
I also updated SW prefetching on target memory but its contribution is almost negligible.
The address to be prefetched will be used in a couple of cycles (at the next iteration)
while the data from memory will be available in >100 cycles.1 parent 4e66cce commit 68185ba
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
661 | 662 | | |
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
671 | 672 | | |
672 | 673 | | |
673 | 674 | | |
| |||
0 commit comments