Skip to content

Conversation

lemire
Copy link
Member

@lemire lemire commented Feb 9, 2023

Replaces ICU by our own implementation.

Fixes #89

@lemire lemire requested a review from anonrig February 9, 2023 15:19
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good! Let's wait for merging since we might need to release a new version before pushing ada/idna to production.

@lemire
Copy link
Member Author

lemire commented Feb 10, 2023

Ada/idna is faster than ICU by about 10%. And many further optimizations are possible.

ada/idna

$ ./buildidna/benchmarks/wpt_bench tests/wpt/urltestdata.json 
BasicBench_AdaURL     418546 ns       418578 ns         1667 GHz=3.3941 cycle/byte=60.3839 cycles/url=1.8774k instructions/byte=106.133 instructions/cycle=1.75763 instructions/ns=5.96559 instructions/url=3.29979k ns/url=553.137 speed=56.2284M/s time/byte=17.7846ns time/url=552.944ns url/s=1.8085M/s

ICU

$ ./buildmain/benchmarks/wpt_bench 
----------------------------------------------------------------------------
Benchmark                  Time             CPU   Iterations UserCounters...
----------------------------------------------------------------------------
BasicBench_AdaURL     480858 ns       480899 ns         1466 GHz=3.39432 cycle/byte=66.5358 cycles/url=2.06867k instructions/byte=114.044 instructions/cycle=1.71402 instructions/ns=5.81792 instructions/url=3.54574k ns/url=609.452 speed=48.9417M/s time/byte=20.4325ns time/url=635.269ns url/s=1.57414M/s

@lemire lemire changed the title This is a prototype of what an ICU-free ada would look like. ICU-free ada Feb 10, 2023
@lemire lemire merged commit 5807351 into main Mar 28, 2023
@lemire lemire deleted the dlemire/no_icu_prototype branch March 28, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write our to_ascii function (drop ICU dependency)

2 participants