All checks were successful
Tests / Clang total: 1479, passed: 1479
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Debug total: 1477, passed: 1477
Tests / SIMD fallback total: 1479, passed: 1479
Tests / Release [gcc] total: 1479, passed: 1479
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 1102, passed: 1102
Tests / Coverage total: 1111, passed: 1111
Code Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 99.60% (1741/1748)
* Branch Coverage: 64.42% (1512/2347)
* Complexity Density: 0.00
* Lines of Code: 1748
#### Quality Gates Summary
Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good
Benchmarks haven't been updated since adding metrics
108 lines
3.8 KiB
Markdown
108 lines
3.8 KiB
Markdown
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
|
|
|--------------------:|--------------------:|--------:|----------:|:----------
|
|
| 245.99 | 4,065,232.81 | 0.3% | 0.01 | `point reads`
|
|
| 265.93 | 3,760,430.49 | 0.2% | 0.01 | `prefix reads`
|
|
| 485.30 | 2,060,569.50 | 0.2% | 0.01 | `range reads`
|
|
| 449.60 | 2,224,195.17 | 0.4% | 0.01 | `point writes`
|
|
| 441.76 | 2,263,688.18 | 1.1% | 0.01 | `prefix writes`
|
|
| 245.42 | 4,074,647.54 | 2.4% | 0.02 | `range writes`
|
|
| 572.80 | 1,745,810.06 | 1.3% | 0.01 | `monotonic increasing point writes`
|
|
| 154,819.33 | 6,459.14 | 0.9% | 0.01 | `worst case for radix tree`
|
|
|
|
## Radix tree (this implementation)
|
|
|
|
| ns/op | op/s | err% | total | benchmark
|
|
|--------------------:|--------------------:|--------:|----------:|:----------
|
|
| 20.25 | 49,372,759.86 | 0.3% | 0.01 | `point reads`
|
|
| 23.58 | 42,401,298.00 | 0.3% | 0.01 | `prefix reads`
|
|
| 64.12 | 15,595,463.14 | 0.8% | 0.01 | `range reads`
|
|
| 29.50 | 33,903,101.20 | 0.7% | 0.01 | `point writes`
|
|
| 46.76 | 21,384,036.19 | 1.2% | 0.01 | `prefix writes`
|
|
| 51.25 | 19,512,195.12 | 0.0% | 0.01 | `range writes`
|
|
| 109.51 | 9,131,469.31 | 3.6% | 0.01 | `monotonic increasing point writes`
|
|
| 1,153,875.00 | 866.65 | 1.6% | 0.01 | `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.60639 seconds, 1434.36 MB/s, Add: 2.10911 seconds, 332.86 MB/s, Gc ratio: 46.3071%
|
|
```
|
|
|
|
## 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%
|
|
```
|