Password Generation Benchmarks
View SourceBenchmark
Benchmark run from 2026-07-10 16:25:14.742445Z 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.20.2 |
| Erlang Version | 29.0.3 |
Configuration
Benchmark suite executing with the following configuration:
| :time | 5 s |
|---|---|
| :parallel | 1 |
| :warmup | 2 s |
Statistics
Run Time
| Name | IPS | Average | Deviation | Median | 99th % |
|---|---|---|---|---|---|
| Dictionary.size() | 34348.48 K | 0.0291 µs | ±120.78% | 0.0410 µs | 0.0420 µs |
| Dictionary.all() | 33663.06 K | 0.0297 µs | ±196.14% | 0.0410 µs | 0.0420 µs |
| Dictionary.count_between(4, 8) | 19685.23 K | 0.0508 µs | ±1305.04% | 0.0420 µs | 0.0840 µs |
| Dictionary.random_word_between(4, 8) | 3531.01 K | 0.28 µs | ±1812.51% | 0.25 µs | 0.50 µs |
| Token.get_number(4) | 2731.28 K | 0.37 µs | ±441.59% | 0.33 µs | 0.67 µs |
| Token.get_number(2) | 2532.17 K | 0.39 µs | ±240.85% | 0.33 µs | 0.88 µs |
| generate(:xkcd) | 283.68 K | 3.53 µs | ±204.28% | 3.17 µs | 6.67 µs |
| generate(:security) | 195.00 K | 5.13 µs | ±347.22% | 4.21 µs | 9.50 µs |
| generate(:web32) | 68.19 K | 14.66 µs | ±113.53% | 12.21 µs | 79.17 µs |
| generate(:wifi) | 60.81 K | 16.45 µs | ±113.19% | 13.83 µs | 57.54 µs |
| transform :upper | 44.72 K | 22.36 µs | ±69.83% | 19.25 µs | 87.39 µs |
| transform :lower | 44.26 K | 22.59 µs | ±71.10% | 19.13 µs | 88.61 µs |
| transform :capitalize | 43.83 K | 22.81 µs | ±82.93% | 19.17 µs | 88.62 µs |
| transform :alternate | 43.75 K | 22.86 µs | ±81.56% | 19.25 µs | 88.19 µs |
| transform :random | 42.99 K | 23.26 µs | ±70.00% | 19.96 µs | 122.66 µs |
| generate() default | 42.80 K | 23.36 µs | ±70.06% | 19.63 µs | 95.92 µs |
| create() 3 words | 41.95 K | 23.84 µs | ±79.85% | 19.75 µs | 150.43 µs |
| create() 4 words | 41.56 K | 24.06 µs | ±92.20% | 19.88 µs | 84.22 µs |
| create() 6 words | 41.25 K | 24.24 µs | ±72.73% | 20.42 µs | 147.58 µs |
| create() 5 words | 39.47 K | 25.33 µs | ±120.01% | 20.42 µs | 98.88 µs |
Run Time Comparison
| Name | IPS | Slower |
|---|---|---|
| Dictionary.size() | 34348.48 K | |
| Dictionary.all() | 33663.06 K | 1.02x |
| Dictionary.count_between(4, 8) | 19685.23 K | 1.74x |
| Dictionary.random_word_between(4, 8) | 3531.01 K | 9.73x |
| Token.get_number(4) | 2731.28 K | 12.58x |
| Token.get_number(2) | 2532.17 K | 13.56x |
| generate(:xkcd) | 283.68 K | 121.08x |
| generate(:security) | 195.00 K | 176.15x |
| generate(:web32) | 68.19 K | 503.7x |
| generate(:wifi) | 60.81 K | 564.87x |
| transform :upper | 44.72 K | 768.02x |
| transform :lower | 44.26 K | 776.06x |
| transform :capitalize | 43.83 K | 783.64x |
| transform :alternate | 43.75 K | 785.13x |
| transform :random | 42.99 K | 799.03x |
| generate() default | 42.80 K | 802.52x |
| create() 3 words | 41.95 K | 818.76x |
| create() 4 words | 41.56 K | 826.57x |
| create() 6 words | 41.25 K | 832.66x |
| create() 5 words | 39.47 K | 870.19x |
Memory Usage
| Name | Average | Factor |
|---|---|---|
| Dictionary.size() | 0 KB | |
| Dictionary.all() | 0 KB | 1.0x |
| Dictionary.count_between(4, 8) | 0.0234 KB | — |
| Dictionary.random_word_between(4, 8) | 0.0719 KB | — |
| Token.get_number(4) | 0.59 KB | — |
| Token.get_number(2) | 0.59 KB | — |
| generate(:xkcd) | 1.72 KB | — |
| generate(:security) | 3.42 KB | — |
| generate(:web32) | 10.87 KB | — |
| generate(:wifi) | 12.24 KB | — |
| transform :upper | 17.28 KB | — |
| transform :lower | 17.28 KB | — |
| transform :capitalize | 17.28 KB | — |
| transform :alternate | 17.28 KB | — |
| transform :random | 17.39 KB | — |
| generate() default | 17.35 KB | — |
| create() 3 words | 17.21 KB | — |
| create() 4 words | 17.36 KB | — |
| create() 6 words | 17.68 KB | — |
| create() 5 words | 17.43 KB | — |