Skip to content

Commit 23f55d8

Browse files
committed
update benchmark results
1 parent 51c1c4c commit 23f55d8

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ Benchmarks comparing ada-idna with the popular `idna` crate (lower is better):
4242

4343
| Benchmark | ada-idna | idna crate | Ratio |
4444
|-----------|----------|------------|-------|
45-
| **Batch to_ascii conversion** | 12.69 µs | 6.07 µs | 2.09x slower |
46-
| **Batch to_unicode conversion** | 5.06 µs | 5.26 µs | **0.96x faster** |
47-
| **Single ASCII domain** | 77.59 ns | 18.98 ns | 4.09x slower |
48-
| **Single Unicode domain** | 291.88 ns | 142.71 ns | 2.05x slower |
49-
| **Complex Unicode domain** | 796.04 ns | 306.25 ns | 2.60x slower |
50-
| **Non-Latin scripts** | 533.68 ns | 266.57 ns | 2.00x slower |
51-
| **CJK domains** | 735.26 ns | 294.66 ns | 2.49x slower |
52-
| **Mixed scripts** | 463.80 ns | 222.23 ns | 2.09x slower |
45+
| **Batch to_ascii conversion** | 7.45 µs | 4.30 µs | 1.73x slower |
46+
| **Batch to_unicode conversion** | 4.41 µs | 3.94 µs | 1.12x slower |
47+
| **Single ASCII domain** | 62.13 ns | 17.59 ns | 3.53x slower |
48+
| **Single Unicode domain** | 19.66 ns | 91.83 ns | **4.67x faster** |
49+
| **Complex Unicode domain** | 24.20 ns | 183.92 ns | **7.60x faster** |
50+
| **Non-Latin scripts** | 363.64 ns | 149.70 ns | 2.43x slower |
51+
| **CJK domains** | 531.77 ns | 170.55 ns | 3.12x slower |
52+
| **Mixed scripts** | 335.57 ns | 140.03 ns | 2.40x slower |
5353

5454
**Ada-idna specific operations:**
55-
- Punycode encoding: 1.79 µs
56-
- Punycode decoding: 640.65 ns
57-
- Unicode normalization: 1.29 µs
55+
- Punycode encoding: 1.57 µs
56+
- Punycode decoding: 515.51 ns
57+
- Unicode normalization: 1.14 µs
5858

5959
*Run `cargo bench` to reproduce these results on your system.*
6060

@@ -63,8 +63,9 @@ Benchmarks comparing ada-idna with the popular `idna` crate (lower is better):
6363
🚧 **This implementation is incomplete and not ready for production use.**
6464

6565
Known limitations:
66-
- Performance is 2.00-4.09x slower than the mature `idna` crate
67-
- **Ada-idna is faster than idna crate for to_unicode conversion**
66+
- Performance is mixed compared to the mature `idna` crate
67+
- **Ada-idna is significantly faster for single Unicode/complex domains**
68+
- **4.67x faster for simple Unicode domains, 7.60x faster for complex Unicode domains**
6869
- Some test cases fail due to expected value discrepancies
6970
- Unicode table data may be incomplete
7071
- Error handling needs refinement

benches/idna_comparison.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,6 @@ fn benchmark_single_domain_performance(c: &mut Criterion) {
261261
fn configure_criterion() -> Criterion {
262262
Criterion::default()
263263
.sample_size(150)
264-
.measurement_time(Duration::from_secs(15))
265-
.warm_up_time(Duration::from_secs(5))
266-
.nresamples(300_000)
267264
.noise_threshold(0.005)
268265
.significance_level(0.01)
269266
.confidence_level(0.99)

0 commit comments

Comments
 (0)