|
8 | 8 |
|
9 | 9 | ### Benchmarks |
10 | 10 |
|
| 11 | + |
| 12 | +#### v3.3.0 |
| 13 | + |
| 14 | +- `censor()` on large text is ~5x faster. |
| 15 | +- `exists()` improved 5–10% across the board. |
| 16 | +- `censor()` regressed ~10% due to array-join overhead with few matches — negligible at >2M ops/sec. |
| 17 | + |
| 18 | +``` |
| 19 | +benchmark-1 | Using test data: v1 |
| 20 | +benchmark-1 | exists() - small profane text x 4,915,990 ops/sec ±2.70% (95 runs sampled) |
| 21 | +benchmark-1 | exists() - small profane text (unicode on) x 1,779,776 ops/sec ±3.15% (95 runs sampled) |
| 22 | +benchmark-1 | exists() - large clean text x 76,738 ops/sec ±2.86% (94 runs sampled) |
| 23 | +benchmark-1 | exists() - large clean text (unicode on) x 14,985 ops/sec ±0.51% (94 runs sampled) |
| 24 | +benchmark-1 | censor() - Word, small profane text x 2,534,015 ops/sec ±2.01% (98 runs sampled) |
| 25 | +benchmark-1 | censor() - Word, small profane text (unicode on) x 1,151,956 ops/sec ±1.60% (98 runs sampled) |
| 26 | +benchmark-1 | censor() - Word, large profane text x 12,141 ops/sec ±0.61% (99 runs sampled) |
| 27 | +benchmark-1 | censor() - Word, large profane text (unicode on) x 8,749 ops/sec ±1.67% (99 runs sampled) |
| 28 | +benchmark-1 | exists() - small clean text x 5,254,667 ops/sec ±2.34% (97 runs sampled) |
| 29 | +benchmark-1 | exists() - large clean text x 81,157 ops/sec ±0.49% (98 runs sampled) |
| 30 | +benchmark-1 | exists() - large profane text x 1,298,867 ops/sec ±6.78% (99 runs sampled) |
| 31 | +benchmark-1 | exists() - partial match, small profane text x 4,405,440 ops/sec ±3.38% (92 runs sampled) |
| 32 | +benchmark-1 | censor() - Word, small profane text x 2,559,010 ops/sec ±0.92% (96 runs sampled) |
| 33 | +benchmark-1 | censor() - FirstChar, small profane text x 2,615,257 ops/sec ±0.17% (98 runs sampled) |
| 34 | +benchmark-1 | censor() - FirstVowel, small profane text x 2,314,978 ops/sec ±2.35% (99 runs sampled) |
| 35 | +benchmark-1 | censor() - AllVowels, small profane text x 2,197,737 ops/sec ±3.82% (90 runs sampled) |
| 36 | +benchmark-1 | censor() - Word, large profane text x 12,296 ops/sec ±0.27% (97 runs sampled) |
| 37 | +benchmark-1 | censor() - partial match, Word, small profane text x 2,292,568 ops/sec ±3.11% (99 runs sampled) |
| 38 | +benchmark-1 | Fastest: exists() - small clean text |
| 39 | +``` |
| 40 | + |
11 | 41 | #### v3.2.0 |
12 | 42 | ``` |
13 | 43 | benchmark-1 | Using test data: v1 |
|
0 commit comments