Merge pull request #2033 from bimbashrestha/icc

[opt] Small icc level 1 compression speed gain using #pragma vector
This commit is contained in:
Bimba Shrestha 2020-03-10 20:42:19 -05:00 committed by GitHub
commit 66607d0eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,13 @@ ZSTD_compressBlock_fast_generic(
} }
/* Main Search Loop */ /* Main Search Loop */
#ifdef __INTEL_COMPILER
/* From intel 'The vector pragma indicates that the loop should be
* vectorized if it is legal to do so'. Can be used together with
* #pragma ivdep (but have opted to exclude that because intel
* warns against using it).*/
#pragma vector always
#endif
while (ip1 < ilimit) { /* < instead of <=, because check at ip0+2 */ while (ip1 < ilimit) { /* < instead of <=, because check at ip0+2 */
size_t mLength; size_t mLength;
BYTE const* ip2 = ip0 + 2; BYTE const* ip2 = ip0 + 2;