Files
versioned-map/README.md

50 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,538.88 | 649,824.01 | 2.7% | 0.22 | `monotonically increasing`
| 1.25 | 798,888,023.37 | 0.0% | 0.01 | `*iter`
| 32.10 | 31,153,434.23 | 0.7% | 0.01 | `++iter`
| 31.08 | 32,178,831.30 | 0.3% | 0.01 | `--iter`
| 139.19 | 7,184,433.93 | 2.2% | 0.02 | `begin`
| 176.43 | 5,667,847.59 | 0.3% | 0.02 | `begin (firstGeq)`
| 54.56 | 18,329,336.92 | 0.4% | 0.01 | `end`
| 159.37 | 6,274,892.80 | 0.1% | 0.10 | `bulkFirstGeq`
| 153.55 | 6,512,408.74 | 0.1% | 0.09 | `bulkFirstGeq (latest version)`
## fdb
| ns/op | op/s | err% | total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
| 2,236.83 | 447,061.26 | 1.0% | 0.29 | `monotonically increasing`
| 2.11 | 473,370,596.42 | 0.9% | 0.01 | `*iter`
| 12.07 | 82,858,977.78 | 1.2% | 0.01 | `++iter`
| 8.54 | 117,158,071.80 | 0.9% | 0.01 | `--iter`
| 94.26 | 10,608,588.66 | 1.1% | 0.01 | `begin`
| 159.01 | 6,288,940.61 | 0.4% | 0.02 | `begin (firstGeq)`
| 73.47 | 13,610,276.41 | 0.9% | 0.01 | `end`
| 422.53 | 2,366,723.10 | 0.1% | 0.25 | `bulkFirstGeq`
| 365.13 | 2,738,758.86 | 0.1% | 0.22 | `bulkFirstGeq (latest version)`