Skip to content

Commit

Permalink
perf: add microbenchmarks for a simple diamond with string manipulati…
Browse files Browse the repository at this point in the history
…on (#1476)

`cargo bench -p benches --bench words_diamond`

```
hydroflow_diamond
                        time:   [72.142 ms 72.831 ms 73.535 ms]
hydroflo2_diamond_forloop
                        time:   [49.023 ms 49.128 ms 49.291 ms]
hydroflo2_diamond_iter_clone_chain
                        time:   [60.333 ms 60.675 ms 61.171 ms]
hydroflo2_diamond_iter_clone_interleave
                        time:   [67.000 ms 67.275 ms 67.613 ms]
hydroflo2_diamond_iter_buffer_chain
                        time:   [62.588 ms 63.017 ms 63.621 ms]
hydroflo2_diamond_iter_tee_chain
                        time:   [59.979 ms 60.390 ms 60.894 ms]
hydroflo2_diamond_iter_tee_interleave
                        time:   [62.646 ms 62.937 ms 63.242 ms]
hydroflo2_diamond_iter_buffer_one
                        time:   [58.574 ms 58.916 ms 59.327 ms]
```


![image](https://github.com/user-attachments/assets/20367b2e-728a-4e1c-99cf-a4d65a7228f8)
  • Loading branch information
MingweiSamuel authored Oct 2, 2024
1 parent 1c28259 commit a064d60
Show file tree
Hide file tree
Showing 5 changed files with 370,357 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ workspace = true
[dev-dependencies]
criterion = { version = "0.5.0", features = [ "async_tokio", "html_reports" ] }
hydroflow = { path = "../hydroflow", features = [ "debugging" ] }
nameof = "1.0.0"
rand = "0.8.0"
rand_distr = "0.4.3"
seq-macro = "0.2.0"
Expand Down Expand Up @@ -62,3 +63,7 @@ harness = false
[[bench]]
name = "symmetric_hash_join"
harness = false

[[bench]]
name = "words_diamond"
harness = false
2 changes: 2 additions & 0 deletions benches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ Run specific benchmarks:
```
cargo bench -p benches --bench reachability
```

Wordlist is from https://github.com/dwyl/english-words/blob/master/words_alpha.txt
Loading

0 comments on commit a064d60

Please sign in to comment.