Hacker News new | ask | show | jobs
by wcdolphin 2762 days ago
Interesting that an iPhone XS is the fastest of all the benchmarks above.

Benchmarking, the higher ops/sec the better. Safari 12.0 on Apple iPhone (iOS 12.1).

Test 100 needles against 16 dictionaries of hostnames - Set-based x 3,763 ops/sec ±0.19% (68 runs sampled) - Regex-based x 392 ops/sec ±0.16% (66 runs sampled) - Trie-based (1st-gen) x 20,669 ops/sec ±0.15% (69 runs sampled) - Trie-based JS (2nd-gen) x 16,926 ops/sec ±0.71% (69 runs sampled) Done.

1 comments

Safari is also a lot faster than Firefox/Chrome on the Trie-based versions (non-wasm)