Hacker News new | ask | show | jobs
by Nullabillity 2757 days ago
That's what I got too:

    Benchmarking, the higher ops/sec the better.
    Firefox 63.0 on Linux 64-bit.

    Test 100 needles against 16 dictionaries of hostnames
      -                 Set-based x 1,992 ops/sec ±0.71% (15 runs sampled)
      -               Regex-based x 5,148 ops/sec ±0.18% (30 runs sampled)
      -      Trie-based (1st-gen) x 11,797 ops/sec ±0.49% (63 runs sampled)
      -   Trie-based JS (2nd-gen) x 8,471 ops/sec ±0.50% (47 runs sampled)
      - Trie-based WASM (2nd-gen) x 9,543 ops/sec ±0.48% (52 runs sampled)
    Done.
I don't see why trie matching performance would depend on the host OS... Unless WASM runs out of process and requires some form of IPC, I guess?
1 comments

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.

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