diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-04-14 23:58:16 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2015-04-14 23:58:16 +0300 |
commit | 936546dcbc24ad1f2b3d33e73aa5c5fde4d2be84 (patch) | |
tree | b6d29aa4308a156d363a08bf4f7ebf89f4047e85 /src/backend/utils/adt/pg_upgrade_support.c | |
parent | b73e7a0716264e5159947b1a755b9ab864142489 (diff) | |
download | postgresql-936546dcbc24ad1f2b3d33e73aa5c5fde4d2be84.tar.gz postgresql-936546dcbc24ad1f2b3d33e73aa5c5fde4d2be84.zip |
Optimize pg_comp_crc32c_sse42 routine slightly, and also use it on x86.
Eliminate the separate 'len' variable from the loops, and also use the 4
byte instruction. This shaves off a few more cycles. Even though this
routine that uses the special SSE 4.2 instructions is much faster than a
generic routine, it's still a hot spot, so let's make it as fast as
possible.
Change the configure test to not test _mm_crc32_u64. That variant is only
available in the 64-bit x86-64 architecture, not in 32-bit x86. Modify
pg_comp_crc32c_sse42 so that it only uses _mm_crc32_u64 on x86-64. With
these changes, the SSE accelerated CRC-32C implementation can also be used
on 32-bit x86 systems.
This also fixes the 32-bit MSVC build.
Diffstat (limited to 'src/backend/utils/adt/pg_upgrade_support.c')
0 files changed, 0 insertions, 0 deletions