Password Generation Benchmarks
View SourceBenchmark
Benchmark run from 2026-01-21 11:05:16.121956Z 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 % |
|---|---|---|---|---|---|
| Dictionary.all() | 504468.26 K | 0.00198 µs | ±83.16% | 0.00196 µs | 0.00275 µs |
| Dictionary.size() | 268887.31 K | 0.00372 µs | ±4035.28% | 0.00420 µs | 0.00830 µs |
| Dictionary.count_between(4, 8) | 23793.24 K | 0.0420 µs | ±1068.95% | 0.0420 µs | 0.0830 µs |
| Dictionary.random_word_between(4, 8) | 5139.03 K | 0.195 µs | ±2025.78% | 0.167 µs | 0.25 µs |
| Token.get_number(2) | 3529.48 K | 0.28 µs | ±819.78% | 0.29 µs | 0.38 µs |
| Token.get_number(4) | 3474.90 K | 0.29 µs | ±950.86% | 0.29 µs | 0.42 µs |
| generate(:security) | 483.78 K | 2.07 µs | ±261.84% | 1.96 µs | 2.96 µs |
| generate(:xkcd) | 480.83 K | 2.08 µs | ±245.91% | 2 µs | 2.88 µs |
| generate(:web32) | 344.35 K | 2.90 µs | ±153.34% | 2.71 µs | 4.25 µs |
| generate() default | 342.80 K | 2.92 µs | ±165.42% | 2.75 µs | 4.17 µs |
| generate(:wifi) | 303.31 K | 3.30 µs | ±155.61% | 3.08 µs | 5.13 µs |
| transform :upper | 49.97 K | 20.01 µs | ±75.10% | 16.75 µs | 141.00 µs |
| create() 6 words | 49.92 K | 20.03 µs | ±63.45% | 17.08 µs | 101.13 µs |
| create() 5 words | 48.23 K | 20.73 µs | ±73.71% | 17.29 µs | 72.25 µs |
| create() 3 words | 47.27 K | 21.15 µs | ±63.48% | 17.58 µs | 82.96 µs |
| transform :capitalize | 46.72 K | 21.40 µs | ±64.61% | 17.83 µs | 87.50 µs |
| transform :alternate | 46.42 K | 21.54 µs | ±65.67% | 17.88 µs | 109.65 µs |
| create() 4 words | 46.28 K | 21.61 µs | ±69.21% | 18.33 µs | 79.75 µs |
| transform :lower | 46.10 K | 21.69 µs | ±67.20% | 18.17 µs | 139.96 µs |
| transform :random | 45.63 K | 21.92 µs | ±61.70% | 18.42 µs | 83.29 µs |
Run Time Comparison
| Name | IPS | Slower |
|---|---|---|
| Dictionary.all() | 504468.26 K | |
| Dictionary.size() | 268887.31 K | 1.88x |
| Dictionary.count_between(4, 8) | 23793.24 K | 21.2x |
| Dictionary.random_word_between(4, 8) | 5139.03 K | 98.16x |
| Token.get_number(2) | 3529.48 K | 142.93x |
| Token.get_number(4) | 3474.90 K | 145.17x |
| generate(:security) | 483.78 K | 1042.77x |
| generate(:xkcd) | 480.83 K | 1049.16x |
| generate(:web32) | 344.35 K | 1464.98x |
| generate() default | 342.80 K | 1471.62x |
| generate(:wifi) | 303.31 K | 1663.2x |
| transform :upper | 49.97 K | 10095.85x |
| create() 6 words | 49.92 K | 10105.27x |
| create() 5 words | 48.23 K | 10458.99x |
| create() 3 words | 47.27 K | 10671.0x |
| transform :capitalize | 46.72 K | 10797.86x |
| transform :alternate | 46.42 K | 10866.45x |
| create() 4 words | 46.28 K | 10900.3x |
| transform :lower | 46.10 K | 10942.38x |
| transform :random | 45.63 K | 11056.07x |
Memory Usage
| Name | Average | Factor |
|---|---|---|
| Dictionary.all() | 0 KB | |
| Dictionary.size() | 0 KB | 1.0x |
| Dictionary.count_between(4, 8) | 0.0234 KB | — |
| Dictionary.random_word_between(4, 8) | 0.0469 KB | — |
| Token.get_number(2) | 0.61 KB | — |
| Token.get_number(4) | 0.62 KB | — |
| generate(:security) | 2.19 KB | — |
| generate(:xkcd) | 1.13 KB | — |
| generate(:web32) | 5.72 KB | — |
| generate() default | 7.56 KB | — |
| generate(:wifi) | 6.60 KB | — |
| transform :upper | 17.73 KB | — |
| create() 6 words | 18.12 KB | — |
| create() 5 words | 17.98 KB | — |
| create() 3 words | 17.80 KB | — |
| transform :capitalize | 17.73 KB | — |
| transform :alternate | 17.80 KB | — |
| create() 4 words | 17.85 KB | — |
| transform :lower | 17.73 KB | — |
| transform :random | 17.79 KB | — |