Open ryanwinchester opened 7 months ago
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
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
:read_concurrency
:write_concurrency
:read_concurrency
&:write_concurrency
:ordered_set
vs:set
ets
+atomics
+persistent_term
) route VS aGenServer