slinso / gotemplatebenchmark Goto Github PK
View Code? Open in Web Editor NEWcomparing the performance of different template engines
comparing the performance of different template engines
Please add bench for text/template with escaping.
What is the command to run the benchmarks?
Tried
./bench.sh
Got
Setting go versions which will be compared with -c or --compare is required
-t --time [arg] Benchmark duration. Required. Default="3s"
-c --compare [arg] Old go version binary? Required.
-g --go [arg] Curenct go version binary? Required. Default="go"
-B --no-benchmarks Do NOT run the benchmarks.
-F --no-format Do NOT format the results.
-u --update update dependencies.
-v Enable verbose mode, print script as it is executed
-d --debug Enables debug mode
-h --help This page
Tried
./bench.sh -O -F
./bench.sh: illegal option -- O
Invalid use of script: -O -F
-t --time [arg] Benchmark duration. Required. Default="3s"
-c --compare [arg] Old go version binary? Required.
-g --go [arg] Curenct go version binary? Required. Default="go"
-B --no-benchmarks Do NOT run the benchmarks.
-F --no-format Do NOT format the results.
-u --update update dependencies.
-v Enable verbose mode, print script as it is executed
-d --debug Enables debug mode
-h --help This page
It would be great periodically refreshing benchmark results after go get -u
and go generate
for all the template engines, since they may be modified sometimes.
Additionally, it would be great to see results fo go 1.8
which should be released today.
I'm getting many errors, am I wrong?
"C:\Program Files\Go\bin\go.exe" test -c -o C:\project\AppData\Local\Temp\___templates_test_go.exe github.com/SlinSo/goTemplateBenchmark #gosetup
"C:\Program Files\Go\bin\go.exe" tool test2json -t C:\project\AppData\Local\Temp\___templates_test_go.exe -test.v -test.run ^\QTestGolang\E|\QTestGolangText\E|\QTestGoFunc\E|\QTestEgo\E|\QTestEgonSlinso\E|\QTestQuicktemplate\E|\QTestFtmpl\E|\QTestAce\E|\QTestAmber\E|\QTestMustache\E|\QTestPongo2\E|\QTestHandlebars\E|\QTestGorazor\E|\QTestSoy\E|\QTestJetHTML\E|\QTestHero\E|\QTestJade\E$ #gosetup
=== RUN TestGolang
templates_test.go:72: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestGolang (0.00s)
=== RUN TestGolangText
templates_test.go:88: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestGolangText (0.00s)
=== RUN TestGoFunc
--- PASS: TestGoFunc (0.00s)
=== RUN TestEgo
--- PASS: TestEgo (0.00s)
=== RUN TestEgonSlinso
--- PASS: TestEgonSlinso (0.00s)
=== RUN TestQuicktemplate
--- PASS: TestQuicktemplate (0.00s)
=== RUN TestFtmpl
--- PASS: TestFtmpl (0.00s)
=== RUN TestAce
--- PASS: TestAce (0.00s)
=== RUN TestAmber
--- PASS: TestAmber (0.00s)
=== RUN TestMustache
templates_test.go:363: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestMustache (0.00s)
=== RUN TestPongo2
templates_test.go:393: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestPongo2 (0.00s)
=== RUN TestHandlebars
templates_test.go:427: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestHandlebars (0.00s)
=== RUN TestGorazor
--- PASS: TestGorazor (0.00s)
=== RUN TestSoy
--- PASS: TestSoy (0.00s)
=== RUN TestJetHTML
templates_test.go:519: Lines don't match
</html>"
2:"<html><body><h1>Bob</h1><p>Here's[space]a[space]list[space]of[space]your[space]favorite[space]colors:</p><ul><li>blue</li><li>green</li><li>mauve</li></ul></body></html>"
--- FAIL: TestJetHTML (0.00s)
=== RUN TestHero
--- PASS: TestHero (0.00s)
=== RUN TestJade
--- PASS: TestJade (0.00s)
FAIL
Process finished with exit code 1
and
"C:\Program Files\Go\bin\go.exe" test -c -o C:\project\AppData\Local\Temp\___templates_complex_test_go.exe github.com/SlinSo/goTemplateBenchmark #gosetup
"C:\Program Files\Go\bin\go.exe" tool test2json -t C:\project\AppData\Local\Temp\___templates_complex_test_go.exe -test.v -test.run ^\QTestComplexGolang\E|\QTestComplexGolangText\E|\QTestComplexEgo\E|\QTestComplexQuicktemplate\E|\QTestComplexEgoSlinso\E|\QTestComplexFtmpl\E|\QTestComplexFtmplInclude\E|\QTestComplexMustache\E|\QTestComplexGorazor\E|\QTestComplexJetHTML\E|\QTestComplexHero\E|\QTestComplexJade\E|\QTestComplexGoFunc\E$ #gosetup
=== RUN TestComplexGolang
templates_complex_test.go:132: Lines don't match
"
2:"<!DOCTYPE[space]html><html><body><header><title>Bob's[space]Home[space]Page</title><div[space]class="header">Page[space]Header</div></header><nav><ul[space]class="navigation"><li><a[space]href="http://www.mytest.com/">Link[space]1</a></li><li><a[space]href="http://www.mytest.com/">Link[space]2</a></li><li><a[space]href="http://www.mytest.com/">Link[space]3</a></li></ul></nav><section><div[space]class="content"><div[space]class="welcome"><h4>Hello[space]Bob</h4><div[space]class="raw"><div><p>Raw[space]Content[space]to[space]be[space]displayed</p></div></div><div[space]class="enc"><div><div><div>Escaped</div></div></div></div></div><p>Bob[space]has[space]1[space]message</p><p>Bob[space]has[space]2[space]messages</p><p>Bob[space]has[space]3[space]messages</p><p>Bob[space]has[space]4[space]messages</p><p>Bob[space]has[space]5[space]messages</p></div></section><footer><div[space]class="footer">copyright[space]2016</div></footer></body></html>"
--- FAIL: TestComplexGolang (0.00s)
=== RUN TestComplexGolangText
templates_complex_test.go:167: Lines don't match
"
2:"<!DOCTYPE[space]html><html><body><header><title>Bob's[space]Home[space]Page</title><div[space]class="header">Page[space]Header</div></header><nav><ul[space]class="navigation"><li><a[space]href="http://www.mytest.com/">Link[space]1</a></li><li><a[space]href="http://www.mytest.com/">Link[space]2</a></li><li><a[space]href="http://www.mytest.com/">Link[space]3</a></li></ul></nav><section><div[space]class="content"><div[space]class="welcome"><h4>Hello[space]Bob</h4><div[space]class="raw"><div><p>Raw[space]Content[space]to[space]be[space]displayed</p></div></div><div[space]class="enc"><div><div><div>Escaped</div></div></div></div></div><p>Bob[space]has[space]1[space]message</p><p>Bob[space]has[space]2[space]messages</p><p>Bob[space]has[space]3[space]messages</p><p>Bob[space]has[space]4[space]messages</p><p>Bob[space]has[space]5[space]messages</p></div></section><footer><div[space]class="footer">copyright[space]2016</div></footer></body></html>"
--- FAIL: TestComplexGolangText (0.04s)
=== RUN TestComplexEgo
--- PASS: TestComplexEgo (0.00s)
=== RUN TestComplexQuicktemplate
--- PASS: TestComplexQuicktemplate (0.00s)
=== RUN TestComplexEgoSlinso
--- PASS: TestComplexEgoSlinso (0.00s)
=== RUN TestComplexFtmpl
--- PASS: TestComplexFtmpl (0.00s)
=== RUN TestComplexFtmplInclude
--- PASS: TestComplexFtmplInclude (0.00s)
=== RUN TestComplexMustache
templates_complex_test.go:351: Lines don't match
</html>"
2:"<!DOCTYPE[space]html><html><body><header><title>Bob's[space]Home[space]Page</title><div[space]class="header">Page[space]Header</div></header><nav><ul[space]class="navigation"><li><a[space]href="http://www.mytest.com/">Link[space]1</a></li><li><a[space]href="http://www.mytest.com/">Link[space]2</a></li><li><a[space]href="http://www.mytest.com/">Link[space]3</a></li></ul></nav><section><div[space]class="content"><div[space]class="welcome"><h4>Hello[space]Bob</h4><div[space]class="raw"><div><p>Raw[space]Content[space]to[space]be[space]displayed</p></div></div><div[space]class="enc"><div><div><div>Escaped</div></div></div></div></div><p>Bob[space]has[space]1[space]message</p><p>Bob[space]has[space]2[space]messages</p><p>Bob[space]has[space]3[space]messages</p><p>Bob[space]has[space]4[space]messages</p><p>Bob[space]has[space]5[space]messages</p></div></section><footer><div[space]class="footer">copyright[space]2016</div></footer></body></html>"
--- FAIL: TestComplexMustache (0.00s)
=== RUN TestComplexGorazor
--- PASS: TestComplexGorazor (0.00s)
=== RUN TestComplexJetHTML
templates_complex_test.go:400: Lines don't match
"
2:"<!DOCTYPE[space]html><html><body><header><title>Bob's[space]Home[space]Page</title><div[space]class="header">Page[space]Header</div></header><nav><ul[space]class="navigation"><li><a[space]href="http://www.mytest.com/">Link[space]1</a></li><li><a[space]href="http://www.mytest.com/">Link[space]2</a></li><li><a[space]href="http://www.mytest.com/">Link[space]3</a></li></ul></nav><section><div[space]class="content"><div[space]class="welcome"><h4>Hello[space]Bob</h4><div[space]class="raw"><div><p>Raw[space]Content[space]to[space]be[space]displayed</p></div></div><div[space]class="enc"><div><div><div>Escaped</div></div></div></div></div><p>Bob[space]has[space]1[space]message</p><p>Bob[space]has[space]2[space]messages</p><p>Bob[space]has[space]3[space]messages</p><p>Bob[space]has[space]4[space]messages</p><p>Bob[space]has[space]5[space]messages</p></div></section><footer><div[space]class="footer">copyright[space]2016</div></footer></body></html>"
--- FAIL: TestComplexJetHTML (0.00s)
=== RUN TestComplexHero
--- PASS: TestComplexHero (0.00s)
=== RUN TestComplexJade
--- PASS: TestComplexJade (0.00s)
=== RUN TestComplexGoFunc
--- PASS: TestComplexGoFunc (0.00s)
FAIL
Process finished with exit code 1
It looks like certain benchmarks don't reset bytes.Buffer
after each iteration, so the buffer constantly grows during the benchmark.
as titled
It would be great to have https://github.com/osteele/liquid here too.
There is actually an issue on their repo but no one has picked this up: osteele/liquid#31
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.