Skip to content

Instantly share code, notes, and snippets.

@philss
Last active January 16, 2017 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philss/70b4b0294f29501c3c7e0f60338cc8bd to your computer and use it in GitHub Desktop.
Save philss/70b4b0294f29501c3c7e0f60338cc8bd to your computer and use it in GitHub Desktop.
Comparison between Mochiweb HTML parser and html5ever parser though ex_html5ever and Floki using Benchee
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Elixir 1.3.4
Benchmark suite executing with the following configuration:
warmup: 2.0s
time: 5.0s
parallel: 1
inputs: Big, Medium, Small
Estimated total run time: 42.0s
Benchmarking with input Big:
Benchmarking html5ever...
Benchmarking mochiweb...
Benchmarking with input Medium:
Benchmarking html5ever...
Benchmarking mochiweb...
Benchmarking with input Small:
Benchmarking html5ever...
Benchmarking mochiweb...
##### With input Big #####
Name ips average deviation median
html5ever 11.14 89.80 ms ±2.80% 89.83 ms
mochiweb 2.97 337.02 ms ±3.21% 338.93 ms
Comparison:
html5ever 11.14
mochiweb 2.97 - 3.75x slower
##### With input Medium #####
Name ips average deviation median
html5ever 201.50 4.96 ms ±12.12% 4.72 ms
mochiweb 119.15 8.39 ms ±12.73% 8.08 ms
Comparison:
html5ever 201.50
mochiweb 119.15 - 1.69x slower
##### With input Small #####
Name ips average deviation median
html5ever 34.91 K 28.64 μs ±51.69% 26.00 μs
mochiweb 26.89 K 37.18 μs ±26.26% 34.00 μs
Comparison:
html5ever 34.91 K
mochiweb 26.89 K - 1.30x slower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment