Andrew Noyes 8e3eacb54f
Some checks failed
Tests / Clang total: 1039, passed: 1039
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / SIMD fallback total: 1039, passed: 1039
Tests / 32-bit versions total: 1039, passed: 1039
Tests / Release [gcc] total: 1039, passed: 1039
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 775, passed: 775
Tests / Coverage total: 780, passed: 780
weaselab/conflict-set/pipeline/head There was a failure building this commit
Apply function multi versioning higher in call stack to save branches
2024-06-30 13:30:44 -07:00
2024-03-06 21:22:30 -08:00
2024-06-27 17:15:35 -07:00
2024-02-21 16:15:40 -08:00
2024-04-04 16:29:26 -07:00
2024-02-20 13:22:22 -08:00
2024-01-30 10:39:43 -08:00
2024-04-09 14:08:58 -07:00
2024-06-26 20:59:33 -07:00
2024-04-01 17:21:43 -07:00

A data structure for optimistic concurrency control on ranges of bitwise-lexicographically-ordered keys.

Intended to replace FoundationDB's skip list.

Hardware for all benchmarks is a mac m1 2020.

FoundationDB's benchmark

Skip list

New conflict set: 1.957 sec
                  0.639 Mtransactions/sec
                  2.555 Mkeys/sec
Detect only:      1.845 sec
                  0.678 Mtransactions/sec
                  2.710 Mkeys/sec
Skiplist only:    1.263 sec
                  0.990 Mtransactions/sec
                  3.960 Mkeys/sec
Performance counters:
               Build: 0.0546
                 Add: 0.0563
              Detect: 1.84
              D.Sort: 0.412
           D.Combine: 0.0141
         D.CheckRead: 0.671
   D.CheckIntraBatch: 0.0068
        D.MergeWrite: 0.592
      D.RemoveBefore: 0.146

Radix tree (this implementation)

New conflict set: 1.366 sec
                  0.915 Mtransactions/sec
                  3.660 Mkeys/sec
Detect only:      1.248 sec
                  1.002 Mtransactions/sec
                  4.007 Mkeys/sec
Skiplist only:    0.573 sec
                  2.182 Mtransactions/sec
                  8.730 Mkeys/sec
Performance counters:
               Build: 0.0594
                 Add: 0.0572
              Detect: 1.25
              D.Sort: 0.418
           D.Combine: 0.0149
         D.CheckRead: 0.232
   D.CheckIntraBatch: 0.0067
        D.MergeWrite: 0.341
      D.RemoveBefore: 0.232

Our benchmark

Skip list

ns/op op/s err% total benchmark
256.89 3,892,784.92 0.3% 0.01 point reads
272.90 3,664,395.04 0.2% 0.01 prefix reads
507.22 1,971,549.50 0.7% 0.01 range reads
452.66 2,209,181.91 0.5% 0.01 point writes
438.09 2,282,619.96 0.4% 0.01 prefix writes
253.33 3,947,420.36 2.5% 0.02 range writes
574.07 1,741,936.71 0.3% 0.01 monotonic increasing point writes
151,562.50 6,597.94 1.5% 0.01 worst case for radix tree

Radix tree (this implementation)

ns/op op/s err% total benchmark
19.83 50,420,955.28 0.1% 0.01 point reads
55.95 17,872,542.40 0.5% 0.01 prefix reads
88.28 11,327,709.50 0.4% 0.01 range reads
29.15 34,309,531.64 0.5% 0.01 point writes
42.36 23,607,424.27 1.1% 0.01 prefix writes
50.00 20,000,000.00 0.0% 0.01 range writes
93.52 10,692,413.79 3.3% 0.01 monotonic increasing point writes
2,388,417.00 418.69 0.4% 0.03 worst case for radix tree

"Real data" test

Point queries only, best of three runs. Gc ratio is the ratio of time spent doing garbage collection to time spent adding writes or doing garbage collection. Lower is better.

skip list

Check: 11.3385 seconds, 329.718 MB/s, Add: 5.35612 seconds, 131.072 MB/s, Gc ratio: 45.7173%

radix tree

Check: 2.48583 seconds, 1503.93 MB/s, Add: 2.12768 seconds, 329.954 MB/s, Gc ratio: 41.7943%

hash table

(The hash table implementation doesn't work on range queries, and its purpose is to provide an idea of how fast point queries can be)

Check: 1.83386 seconds, 2038.6 MB/s, Add: 0.601411 seconds, 1167.32 MB/s, Gc ratio: 48.9776%
Description
A data structure for optimistic concurrency control on ranges of bitwise-lexicographically-ordered keys.
Readme 25 MiB
v0.0.13 Latest
2024-08-26 21:24:21 +00:00
Languages
C++ 82.9%
TeX 8.1%
CMake 4.8%
Python 2.7%
Shell 0.9%
Other 0.6%