Skip to content

Commit

Permalink
docs: add benchmarks to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Nov 3, 2024
1 parent 1d51202 commit 0a4eda3
Show file tree
Hide file tree
Showing 19 changed files with 3,512 additions and 2 deletions.
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,53 @@ async fn main() {
}
```

## 📊 Benchmark
## 📊 Benchmarks

> TODO: Add benchmark figures
Benchmarks were run in a asyncified version of [this benchmark](https://github.com/xacrimon/conc-map-bench). You can
find it [here](https://github.com/willothy/conc-map-bench). Since the benchmarks use [`jonhoo/bustle`](https://github.com/jonhoo/bustle),
an asyncified fork of that library ([here](https://github.com/willothy/bustle)) is required.

Machine: Apple M3 Max (2023 16-inch MacBook Pro, 36GB RAM)

OS: macOS 15.0

See the `results/` directory.

### Read Heavy (std hasher)

| | |
:-------------------------:|:-------------------------:
![](results/ReadHeavy.std.throughput.svg) | ![](results/ReadHeavy.std.latency.svg)

### Exchange (std hasher)

| | |
:-------------------------:|:-------------------------:
![](results/Exchange.std.throughput.svg) | ![](results/Exchange.std.latency.svg)

### Rapid Grow (std hasher)

| | |
:-------------------------:|:-------------------------:
![](results/RapidGrow.std.throughput.svg) | ![](results/RapidGrow.std.latency.svg)

### Read Heavy (ahash)

| | |
:-------------------------:|:-------------------------:
![](results/ReadHeavy.ahash.throughput.svg) | ![](results/ReadHeavy.ahash.latency.svg)

### Exchange (ahash)

| | |
:-------------------------:|:-------------------------:
![](results/Exchange.ahash.throughput.svg) | ![](results/Exchange.ahash.latency.svg)

### Rapid Grow (ahash)

| | |
:-------------------------:|:-------------------------:
![](results/RapidGrow.ahash.throughput.svg) | ![](results/RapidGrow.ahash.latency.svg)

## 🤝 Contributing

Expand Down
57 changes: 57 additions & 0 deletions results/Exchange.ahash.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name,total_ops,threads,spent,throughput,latency
std::sync::RwLock<StdHashMap>,33554432,1,1961856125,17103411.18923795,58
std::sync::RwLock<StdHashMap>,33554432,2,1907064458,17594807.485002168,113
std::sync::RwLock<StdHashMap>,33554432,4,2449463250,13698687.661470324,291
std::sync::RwLock<StdHashMap>,33554432,6,3823332292,8776226.976192946,683
std::sync::RwLock<StdHashMap>,33554432,8,3974604208,8442207.134099627,947
std::sync::RwLock<StdHashMap>,33554432,10,4529053833,7408706.815430781,1349
std::sync::RwLock<StdHashMap>,33554432,12,4671495208,7182803.47211693,1670
std::sync::RwLock<StdHashMap>,33554432,14,4755715375,7055601.3878353685,1984
Whirlwind,33554432,1,2659308625,12617727.66220393,79
Whirlwind,33554432,2,2667312750,12579864.134792592,158
Whirlwind,33554432,4,1041210458,32226368.590700425,124
Whirlwind,33554432,6,745400625,45015298.98770879,133
Whirlwind,33554432,8,614593041,54596179.52296339,146
Whirlwind,33554432,10,543906959,61691492.349521495,162
Whirlwind,33554432,12,618545333,54247328.707918644,221
Whirlwind,33554432,14,522493667,64219786.99313115,218
DashMap,33554432,1,1816874750,18468214.168312922,54
DashMap,33554432,2,1775391666,18899734.995151207,105
DashMap,33554432,4,1078015208,31126121.181770932,128
DashMap,33554432,6,907789542,36962787.57086629,162
DashMap,33554432,8,721972125,46476076.89839826,172
DashMap,33554432,10,627028625,53513397.41467146,186
DashMap,33554432,12,549552792,61057704.534417145,196
DashMap,33554432,14,547569875,61278813.0464628,228
Flurry,33554432,1,5762001834,5823398.354718399,171
Flurry,33554432,2,5532963625,6064459.171281829,329
Flurry,33554432,4,3089110333,10862166.896905072,368
Flurry,33554432,6,2453668875,13675207.906771854,438
Flurry,33554432,8,2282568208,14700297.621949531,544
Flurry,33554432,10,2174596250,15430189.397227187,648
Flurry,33554432,12,2305712375,14552739.692868238,824
Flurry,33554432,14,2436477291,13771699.05254003,1016
Contrie,33554432,1,10008375042,3352635.3538101153,298
Contrie,33554432,2,10413623041,3222166.950723217,620
Contrie,33554432,4,4779533250,7020441.169647684,569
Contrie,33554432,6,3530570416,9503969.060618788,631
Contrie,33554432,8,2735428333,12266609.801178806,652
Contrie,33554432,10,2432395625,13794808.564499043,724
Contrie,33554432,12,1974154041,16996866.152857624,706
Contrie,33554432,14,1744712458,19232069.93000104,727
SccMap,33554432,1,3433359875,9773059.982533874,102
SccMap,33554432,2,3423693792,9800652.172342403,204
SccMap,33554432,4,1732266666,19370246.3128734,206
SccMap,33554432,6,1083085709,30980403.232335515,193
SccMap,33554432,8,808901916,41481459.41590278,192
SccMap,33554432,10,685389542,48956731.82010705,204
SccMap,33554432,12,590316959,56841382.393691316,211
SccMap,33554432,14,543821750,61701158.51379611,226
CHashMap,33554432,1,2463606375,13620045.9377363,73
CHashMap,33554432,2,2409286833,13927122.142704211,143
CHashMap,33554432,4,2776520625,12085064.91825538,330
CHashMap,33554432,6,3347246416,10024488.140343715,598
CHashMap,33554432,8,5490261833,6111626.917010827,1308
CHashMap,33554432,10,7244375125,4631791.068384245,2158
CHashMap,33554432,12,10016865542,3349793.59154904,3582
CHashMap,33554432,14,11259991208,2979969.644750721,4698
Loading

0 comments on commit 0a4eda3

Please sign in to comment.