Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmarks #5

Open
5 of 6 tasks
ryanwinchester opened this issue Apr 18, 2024 · 2 comments
Open
5 of 6 tasks

Benchmarks #5

ryanwinchester opened this issue Apr 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@ryanwinchester
Copy link
Owner

ryanwinchester commented Apr 18, 2024

  • with :read_concurrency
  • with :write_concurrency
  • with :read_concurrency & :write_concurrency
  • with :ordered_set vs :set
  • with different cleanup intervals
  • The current (ets + atomics + persistent_term) route VS a GenServer
@ryanwinchester ryanwinchester added the question Further information is requested label Apr 18, 2024
@ryanwinchester
Copy link
Owner Author

ryanwinchester commented Apr 18, 2024

Current VS a GenServer

Name                  ips        average  deviation         median         99th %
Clock              2.76 M      361.90 ns  ±4273.38%         333 ns         459 ns
ClockServer        1.01 M      988.17 ns  ±1120.96%         875 ns        1458 ns

Comparison:
Clock              2.76 M
ClockServer        1.01 M - 2.73x slower +626.27 ns

@ryanwinchester
Copy link
Owner Author

With different ETS options

Name                             ips        average  deviation         median         99th %
set_read                      2.63 M      380.54 ns  ±4697.49%         333 ns         500 ns
set                           2.63 M      380.58 ns  ±4632.98%         333 ns         500 ns
set_read_write                2.58 M      386.85 ns  ±4542.94%         333 ns         500 ns
set_write                     2.56 M      390.76 ns  ±4878.90%         333 ns         500 ns
ordered_set                   2.43 M      411.41 ns  ±4338.00%         375 ns         541 ns
ordered_set_read              2.41 M      414.96 ns  ±4490.06%         375 ns         542 ns
ordered_set_write             2.35 M      425.43 ns  ±4256.97%         375 ns         542 ns
ordered_set_read_write        2.30 M      435.51 ns  ±4344.85%         375 ns         542 ns

Comparison:
set_read                      2.63 M
set                           2.63 M - 1.00x slower +0.0405 ns
set_read_write                2.58 M - 1.02x slower +6.30 ns
set_write                     2.56 M - 1.03x slower +10.21 ns
ordered_set                   2.43 M - 1.08x slower +30.87 ns
ordered_set_read              2.41 M - 1.09x slower +34.42 ns
ordered_set_write             2.35 M - 1.12x slower +44.89 ns
ordered_set_read_write        2.30 M - 1.14x slower +54.97 ns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant