pgsql: Speed up CRC calculation using slicing-by-8 algorithm.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Speed up CRC calculation using slicing-by-8 algorithm.
Дата
Msg-id E1YL6mA-0007fY-A9@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Speed up CRC calculation using slicing-by-8 algorithm.

This speeds up WAL generation and replay. The new algorithm is
significantly faster with large inputs, like full-page images or when
inserting wide rows. It is slower with tiny inputs, i.e. less than 10 bytes
or so, but the speedup with longer inputs more than make up for that. Even
small WAL records at least have 24 byte header in the front.

The output is identical to the current byte-at-a-time computation, so this
does not affect compatibility. The new algorithm is only used for the
CRC-32C variant, not the legacy version used in tsquery or the
"traditional" CRC-32 used in hstore and ltree. Those are not as performance
critical, and are usually only applied over small inputs, so it seems
better to not carry around the extra lookup tables to speed up those rare
cases.

Abhijit Menon-Sen

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/025c02420de990c15a90e9e3f86fcfbc5b59ee88

Modified Files
--------------
config/c-compiler.m4          |   17 +
configure                     |   30 +
configure.in                  |    1 +
src/common/pg_crc.c           | 1224 ++++++++++++++++++++++++++++++++++++++---
src/include/common/pg_crc.h   |   53 +-
src/include/pg_config.h.in    |    3 +
src/include/pg_config.h.win32 |    3 +
7 files changed, 1246 insertions(+), 85 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: Minor cleanup/code review for "indirect toast" stuff.
Следующее
От: Michael Meskes
Дата:
Сообщение: pgsql: Fixed array handling in ecpg.