Dictionary Benchmarks
View SourceBenchmark
Benchmark run from 2026-01-21 11:05:43.748585Z UTC
System
Benchmark suite executing on the following system:
| Operating System | macOS |
|---|---|
| CPU Information | Apple M4 Max |
| Number of Available Cores | 16 |
| Available Memory | 128 GB |
| Elixir Version | 1.19.5 |
| Erlang Version | 28.2 |
Configuration
Benchmark suite executing with the following configuration:
| :time | 5 s |
|---|---|
| :parallel | 1 |
| :warmup | 2 s |
Statistics
Run Time
| Name | IPS | Average | Devitation | Median | 99th % |
|---|---|---|---|---|---|
| size() - O(1) | 275.32 M | 3.63 ns | ±3881.91% | 4.20 ns | 8.30 ns |
| max_length() - O(1) | 272.08 M | 3.68 ns | ±3759.72% | 4.20 ns | 8.30 ns |
| min_length() - O(1) | 39.35 M | 25.41 ns | ±136.96% | 41 ns | 42 ns |
| all() - O(1) | 38.80 M | 25.77 ns | ±201.07% | 41 ns | 42 ns |
| count_between(3, 10) | 23.74 M | 42.12 ns | ±1060.53% | 42 ns | 83 ns |
| count_between(4, 8) | 23.64 M | 42.31 ns | ±1399.66% | 42 ns | 83 ns |
| count_between(3, 5) | 23.34 M | 42.85 ns | ±1138.26% | 42 ns | 83 ns |
| random_word_between(4, 6) | 5.23 M | 191.30 ns | ±1713.05% | 167 ns | 250 ns |
| random_word_between(3, 10) | 5.21 M | 191.81 ns | ±1696.84% | 167 ns | 250 ns |
| random_word_between(4, 8) | 5.14 M | 194.70 ns | ±1733.01% | 167 ns | 291 ns |
Run Time Comparison
| Name | IPS | Slower |
|---|---|---|
| size() - O(1) | 275.32 M | |
| max_length() - O(1) | 272.08 M | 1.01x |
| min_length() - O(1) | 39.35 M | 7.0x |
| all() - O(1) | 38.80 M | 7.1x |
| count_between(3, 10) | 23.74 M | 11.6x |
| count_between(4, 8) | 23.64 M | 11.65x |
| count_between(3, 5) | 23.34 M | 11.8x |
| random_word_between(4, 6) | 5.23 M | 52.67x |
| random_word_between(3, 10) | 5.21 M | 52.81x |
| random_word_between(4, 8) | 5.14 M | 53.6x |
Memory Usage
| Name | Average | Factor |
|---|---|---|
| size() - O(1) | 0 B | |
| max_length() - O(1) | 0 B | 1.0x |
| min_length() - O(1) | 0 B | 1.0x |
| all() - O(1) | 0 B | 1.0x |
| count_between(3, 10) | 24 B | — |
| count_between(4, 8) | 24 B | — |
| count_between(3, 5) | 24 B | — |
| random_word_between(4, 6) | 48 B | — |
| random_word_between(3, 10) | 48.00 B | — |
| random_word_between(4, 8) | 48 B | — |