top | item 18586723

(no title)

hornetblack | 7 years ago

Results on mine:

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

    Test 100 needles against 16 dictionaries of hostnames
      -                 Set-based x 1,443 ops/sec ±3.46% (54 runs sampled)
      -               Regex-based x 4,093 ops/sec ±1.18% (25 runs sampled)
      -      Trie-based (1st-gen) x 8,993 ops/sec ±1.92% (59 runs sampled)
      -   Trie-based JS (2nd-gen) x 7,923 ops/sec ±2.81% (44 runs sampled)
      - Trie-based WASM (2nd-gen) x 10,100 ops/sec ±1.75% (54 runs sampled)
    Done.

discuss

order

pietroglyph|7 years ago

Interestingly, my numbers are completely different relative to each other when compared with yours... I wonder how the number of runs is determined and if this affects the results.

  Benchmarking, the higher ops/sec the better.
  Firefox 63.0 on Fedora 64-bit.
  
  Test 100 needles against 16 dictionaries of hostnames
    -                 Set-based x 1,707 ops/sec ±1.93% (60 runs sampled)
    -               Regex-based x 4,078 ops/sec ±0.88% (25 runs sampled)
    -      Trie-based (1st-gen) x 10,038 ops/sec ±1.41% (64 runs sampled)
    -   Trie-based JS (2nd-gen) x 7,258 ops/sec ±1.03% (40 runs sampled)
    - Trie-based WASM (2nd-gen) x 8,033 ops/sec ±1.08% (44 runs sampled)
  Done.

DiabloD3|7 years ago

  Benchmarking, the higher ops/sec the better.
  Firefox 65.0 on Windows 10 64-bit.

  Test 100 needles against 16 dictionaries of hostnames
  -            Set-based x 1,647 ops/sec ±2.23% (13 runs sampled)
  -          Regex-based x 1,178 ops/sec ±4.95% (48 runs sampled)
  -                 Set-based x 1,854 ops/sec ±1.94% (59 runs sampled)
  - Trie-based (1st-gen) x 275 ops/sec ±4.61% (56 runs sampled)
  -               Regex-based x 2,947 ops/sec ±2.32% (61 runs sampled)
  - Trie-based (2nd-gen) x 671 ops/sec ±2.60% (47 runs sampled)
  Done.

  -      Trie-based (1st-gen) x 9,311 ops/sec ±1.61% (51 runs sampled)
  -   Trie-based JS (2nd-gen) x 7,121 ops/sec ±1.28% (40 runs sampled)
  - Trie-based WASM (2nd-gen) x 7,983 ops/sec ±2.44% (63 runs sampled)
  Done.
And mine seems to look different than yours, but similarly lopsided.

jannes|7 years ago

I got these results on an i7 8700K (not overclocked):

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

  Test 100 needles against 16 dictionaries of hostnames
    -                 Set-based x 1,917 ops/sec ±1.21% (14 runs sampled)
    - Trie-based (2nd-gen) x 829 ops/sec ±0.64% (66 runs sampled)
  Done.

    -               Regex-based x 4,475 ops/sec ±0.37% (27 runs sampled)
    -      Trie-based (1st-gen) x 8,624 ops/sec ±0.29% (48 runs sampled)
    -   Trie-based JS (2nd-gen) x 8,848 ops/sec ±0.43% (49 runs sampled)
    - Trie-based WASM (2nd-gen) x 10,441 ops/sec ±0.30% (57 runs sampled)
  Done.
Interestingly, my CPU only boosts to 4.3 GHz during this benchmark and CPU utilisation of the Firefox process only goes up to 8%.

Nullabillity|7 years 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?

gorhill|7 years ago

For some reasons, I found that Firefox's results for WASM are always better after a first run -- i.e. clicking "Lookup" again without reloading the page. I don't know what is the explanation of this.

X-Istence|7 years ago

  Benchmarking, the higher ops/sec the better.
  Safari 12.0.1 on OS X 10.14.1.

  Test 100 needles against 16 dictionaries of hostnames
    -                 Set-based x 3,801 ops/sec ±1.01% (62 runs sampled)
    -               Regex-based x 370 ops/sec ±0.68% (60 runs sampled)
    -      Trie-based (1st-gen) x 15,679 ops/sec ±0.73% (63 runs sampled)
    -   Trie-based JS (2nd-gen) x 16,408 ops/sec ±2.50% (62 runs sampled)

  Benchmarking, the higher ops/sec the better.
  Firefox 63.0 on OS X 10.14.

  Test 100 needles against 16 dictionaries of hostnames
    -                 Set-based x 1,703 ops/sec ±3.46% (57 runs sampled)
    -               Regex-based x 4,210 ops/sec ±1.95% (26 runs sampled)
    -      Trie-based (1st-gen) x 9,961 ops/sec ±0.74% (65 runs sampled)
    -   Trie-based JS (2nd-gen) x 7,120 ops/sec ±0.61% (40 runs sampled)
    - Trie-based WASM (2nd-gen) x 7,993 ops/sec ±0.81% (44 runs sampled)

  Benchmarking, the higher ops/sec the better.
  Chrome 70.0.3538.110 on OS X 10.14.1 64-bit.

  Test 100 needles against 16 dictionaries of hostnames
    -                 Set-based x 3,414 ops/sec ±5.66% (53 runs sampled)
    -               Regex-based x 4,667 ops/sec ±2.50% (28 runs sampled)
    -      Trie-based (1st-gen) x 10,665 ops/sec ±1.31% (56 runs sampled)
    -   Trie-based JS (2nd-gen) x 7,852 ops/sec ±1.66% (43 runs sampled)
    - Trie-based WASM (2nd-gen) x 11,930 ops/sec ±2.49% (58 runs sampled)

MacOS 10.14.1

Hardware:

MacBook Pro (15-inch, 2017)

Processor: 2.9 GHz Intel Core i7

Memory: 16 GB 2133 MHz LPDDR3

Graphics: Radeon Pro 560 4096 MB

Intel HD Graphics 630 1536 MB

xhruso00|7 years ago

  Benchmarking, the higher ops/sec the better.
  Safari 11.1.2 on OS X 10.12.6.

  Create dictionaries
  -Set-based x 1,393 ops/sec ±0.85% (60 runs sampled)
  -Regex-based x 1,798 ops/sec ±0.75% (61 runs sampled)
  -Trie-based (1st-gen) x 419 ops/sec ±1.35% (61 runs sampled)
  -Trie-based (2nd-gen) x 986 ops/sec ±0.77% (63 runs sampled)
  Done.