- Notifications
You must be signed in to change notification settings - Fork5
Commit025c024
committed
Speed up CRC calculation using slicing-by-8 algorithm.
This speeds up WAL generation and replay. The new algorithm issignificantly faster with large inputs, like full-page images or wheninserting wide rows. It is slower with tiny inputs, i.e. less than 10 bytesor so, but the speedup with longer inputs more than make up for that. Evensmall WAL records at least have 24 byte header in the front.The output is identical to the current byte-at-a-time computation, so thisdoes not affect compatibility. The new algorithm is only used for theCRC-32C variant, not the legacy version used in tsquery or the"traditional" CRC-32 used in hstore and ltree. Those are not as performancecritical, and are usually only applied over small inputs, so it seemsbetter to not carry around the extra lookup tables to speed up those rarecases.Abhijit Menon-Sen1 parentcc761b1 commit025c024
File tree
7 files changed
+1246
-85
lines changed- config
- src
- common
- include
- common
7 files changed
+1246
-85
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
196 | 213 |
| |
197 | 214 |
| |
198 | 215 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10332 | 10332 |
| |
10333 | 10333 |
| |
10334 | 10334 |
| |
| 10335 | + | |
| 10336 | + | |
| 10337 | + | |
| 10338 | + | |
| 10339 | + | |
| 10340 | + | |
| 10341 | + | |
| 10342 | + | |
| 10343 | + | |
| 10344 | + | |
| 10345 | + | |
| 10346 | + | |
| 10347 | + | |
| 10348 | + | |
| 10349 | + | |
| 10350 | + | |
| 10351 | + | |
| 10352 | + | |
| 10353 | + | |
| 10354 | + | |
| 10355 | + | |
| 10356 | + | |
| 10357 | + | |
| 10358 | + | |
| 10359 | + | |
| 10360 | + | |
| 10361 | + | |
| 10362 | + | |
| 10363 | + | |
| 10364 | + | |
10335 | 10365 |
| |
10336 | 10366 |
| |
10337 | 10367 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1185 | 1185 |
| |
1186 | 1186 |
| |
1187 | 1187 |
| |
| 1188 | + | |
1188 | 1189 |
| |
1189 | 1190 |
| |
1190 | 1191 |
| |
|
0 commit comments
Comments
(0)