Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85823446
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/bench/basic_html_bench.exs b/bench/basic_html_bench.exs
index 7cb794f..64434e7 100644
--- a/bench/basic_html_bench.exs
+++ b/bench/basic_html_bench.exs
@@ -1,41 +1,23 @@
defmodule BasicHtmlBench do
use Benchfella
- setup_all do
- html = File.read!("bench/w3c_html5.html")
- context = {html, Myhtmlex.open(html)}
- {:ok, context}
- end
-
bench "decode" do
{html, _} = bench_context
- Myhtmlex.decode(html)
+ :fast_html.decode(html)
end
bench "decode w/ html_atoms" do
{html, _} = bench_context
- Myhtmlex.decode(html, format: [:html_atoms])
+ :fast_html.decode(html, format: [:html_atoms])
end
bench "decode w/ nil_self_closing" do
{html, _} = bench_context
- Myhtmlex.decode(html, format: [:nil_self_closing])
+ :fast_html.decode(html, format: [:nil_self_closing])
end
bench "decode w/ html_atoms, nil_self_closing" do
{html, _} = bench_context
- Myhtmlex.decode(html, format: [:html_atoms, :nil_self_closing])
- end
-
- bench "decode_tree" do
- {_, ref} = bench_context
- Myhtmlex.decode_tree(ref)
+ :fast_html.decode(html, format: [:html_atoms, :nil_self_closing])
end
-
- bench "decode_tree w/ html_atoms" do
- {_, ref} = bench_context
- Myhtmlex.decode_tree(ref, format: [:html_atoms])
- end
-
end
-
diff --git a/bench/cnode/file_sizes_bench.exs b/bench/cnode/file_sizes_bench.exs
index 6c4722f..44c9bbf 100644
--- a/bench/cnode/file_sizes_bench.exs
+++ b/bench/cnode/file_sizes_bench.exs
@@ -1,31 +1,31 @@
defmodule CnodeFileSizesBench do
use Benchfella
setup_all do
Nodex.Distributed.up
{:ok, _pid} = Nodex.Cnode.start_link(%{exec_path: "priv/myhtml_worker"}, name: Myhtmlex.Safe.Cnode)
contents = {
File.read!("bench/github_trending_js.html"),
File.read!("bench/w3c_html5.html"),
File.read!("bench/wikipedia_hyperlink.html")
}
{:ok, contents}
end
bench "github_trending_js.html 341k" do
{ref, _, _} = bench_context
- Myhtmlex.Safe.decode(ref)
+ :fast_html.decode(ref)
end
bench "w3c_html5.html 131k" do
{_, ref, _} = bench_context
- Myhtmlex.Safe.decode(ref)
+ :fast_html.decode(ref)
end
bench "wikipedia_hyperlink.html 97k" do
{_, _, ref} = bench_context
- Myhtmlex.Safe.decode(ref)
+ :fast_html.decode(ref)
end
end
diff --git a/bench/file_sizes_bench.exs b/bench/file_sizes_bench.exs
deleted file mode 100644
index 9c18dae..0000000
--- a/bench/file_sizes_bench.exs
+++ /dev/null
@@ -1,29 +0,0 @@
-defmodule FileSizesBench do
- use Benchfella
-
- setup_all do
- refs = {
- File.read!("bench/github_trending_js.html") |> Myhtmlex.open,
- File.read!("bench/w3c_html5.html") |> Myhtmlex.open,
- File.read!("bench/wikipedia_hyperlink.html") |> Myhtmlex.open
- }
- {:ok, refs}
- end
-
- bench "github_trending_js.html 341k" do
- {ref, _, _} = bench_context
- Myhtmlex.decode_tree(ref)
- end
-
- bench "w3c_html5.html 131k" do
- {_, ref, _} = bench_context
- Myhtmlex.decode_tree(ref)
- end
-
- bench "wikipedia_hyperlink.html 97k" do
- {_, _, ref} = bench_context
- Myhtmlex.decode_tree(ref)
- end
-
-end
-
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Oct 29, 5:43 AM (9 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1797609
Default Alt Text
(3 KB)
Attached To
Mode
R16 fast_html
Attached
Detach File
Event Timeline