Files
versioned-map/README.md

51 lines
2.5 KiB
Markdown

feature | weaselab | fdb |
|-|-|-|
|based on|node-copying treap|node-copying treap|
|branch-free `child` function|✅|❌|
|bytes per node (worst-case)|64 + kv len + 1\*|96 + kv len|
|cheaper iteration*|❌|✅|
|efficient bulk queries|✅|❌|
|entries per set (worst-case)|1|3|
|memory-usage (rough)|40%|100%|
|node gc|mark-and-sweep|reference-counting|
|pointer size|32-bit|64-bit|
|purge strategy|scan|search|
|read from foreign thread|✅ |❌ |
|recursion-free|✅ |❌|
|returns node memory to OS|✅ |❌|
|searches per point clear|1|5|
|searches per range clear|2|5|
|searches per set (worst-case)|1|4|
\* Part of a set of tradeoffs that enable 1 entry per set worst-case
# benchmarks
## weaselab
| ns/op | op/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
| 1,225.88 | 815,738.46 | 0.7% | 0.31 | `monotonically increasing`
| 1.27 | 785,633,468.91 | 0.2% | 0.01 | `*iter`
| 29.18 | 34,265,322.00 | 0.4% | 0.01 | `++iter`
| 30.55 | 32,729,535.46 | 0.6% | 0.01 | `--iter`
| 155.38 | 6,435,768.30 | 0.4% | 0.04 | `begin`
| 181.88 | 5,498,125.78 | 0.5% | 0.04 | `begin (firstGeq)`
| 46.29 | 21,603,059.16 | 0.3% | 0.01 | `end`
| 169.68 | 5,893,481.63 | 0.1% | 0.10 | `bulkFirstGeq`
| 162.61 | 6,149,704.63 | 0.1% | 0.10 | `bulkFirstGeq (latest version)`
## fdb
| ns/op | op/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
| 2,237.52 | 446,923.66 | 0.6% | 0.56 | `monotonically increasing`
| 2.07 | 484,208,685.89 | 0.6% | 0.01 | `*iter`
| 9.91 | 100,926,329.70 | 0.5% | 0.01 | `++iter`
| 11.36 | 88,023,104.91 | 0.3% | 0.01 | `--iter`
| 87.70 | 11,402,839.76 | 0.2% | 0.02 | `begin`
| 110.58 | 9,043,264.46 | 0.2% | 0.03 | `begin (firstGeq)`
| 67.30 | 14,859,247.22 | 0.3% | 0.02 | `end`
| 411.72 | 2,428,853.18 | 0.1% | 0.25 | `bulkFirstGeq`
| 350.54 | 2,852,725.55 | 0.1% | 0.21 | `bulkFirstGeq (latest version)`