Skip to content

Conversation

@markuswustenberg
Copy link

The (incomplete) output from running this locally:

~/Developer/goTemplateBenchmark (gomponents-v1.2.0) $ ./bench.sh -c go
2025-08-20 10:50:07 UTC [     info] OSTYPE: darwin24
2025-08-20 10:50:07 UTC [     info] benchmark duration: 3s
2025-08-20 10:50:07 UTC [     info] compare: go to go
2025-08-20 10:50:07 UTC [     info] count: 1
2025-08-20 10:50:07 UTC [     info] run benchmarks: true
2025-08-20 10:50:07 UTC [     info] format output: true
goos: darwin
goarch: arm64
pkg: github.com/SlinSo/goTemplateBenchmark
cpu: Apple M3 Max
BenchmarkGolang-16        	 2240340	      1605 ns/op	     672 B/op	      27 allocs/op
BenchmarkGolangText-16    	 6556706	       550.0 ns/op	     224 B/op	       7 allocs/op
BenchmarkAce-16           	 1000000	      3007 ns/op	    1073 B/op	      32 allocs/op
BenchmarkAmber-16         	 2205153	      1650 ns/op	     752 B/op	      28 allocs/op
BenchmarkMustache-16      	 3612835	      1004 ns/op	    1610 B/op	      24 allocs/op
BenchmarkPongo2-16        	 2412781	      1485 ns/op	    2058 B/op	      30 allocs/op
BenchmarkHandlebars-16    	 1000000	      3066 ns/op	    3405 B/op	      73 allocs/op
BenchmarkSoy-16           	 3889201	       928.5 ns/op	    1224 B/op	      19 allocs/op
BenchmarkJetHTML-16       	10138041	       359.6 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/SlinSo/goTemplateBenchmark	39.295s
goos: darwin
goarch: arm64
pkg: github.com/SlinSo/goTemplateBenchmark
cpu: Apple M3 Max
BenchmarkEgo-16              	14377816	       237.3 ns/op	      85 B/op	       8 allocs/op
BenchmarkHB-16               	 2716908	      1326 ns/op	    1984 B/op	      36 allocs/op
BenchmarkQuicktemplate-16    	31811545	       112.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkFtmpl-16            	 8272232	       434.6 ns/op	     774 B/op	      12 allocs/op
BenchmarkGorazor-16          	14161546	       256.0 ns/op	     512 B/op	       5 allocs/op
BenchmarkGoh-16              	66481276	        53.63 ns/op	       0 B/op	       0 allocs/op
BenchmarkHero-16             	41736770	        85.13 ns/op	       0 B/op	       0 allocs/op
BenchmarkJade-16             	61708378	        57.46 ns/op	       0 B/op	       0 allocs/op
BenchmarkTempl-16            	26225670	       135.9 ns/op	      96 B/op	       2 allocs/op
BenchmarkGomponents-16       	 4505257	       802.6 ns/op	     776 B/op	      25 allocs/op
PASS
ok  	github.com/SlinSo/goTemplateBenchmark	39.417s
goos: darwin
goarch: arm64
pkg: github.com/SlinSo/goTemplateBenchmark
cpu: Apple M3 Max
BenchmarkComplexGolang-16        	  229786	     14867 ns/op	    5471 B/op	     209 allocs/op
BenchmarkComplexGolangText-16    	  532114	      6728 ns/op	    2395 B/op	      78 allocs/op
BenchmarkComplexMustache-16      	  610382	      6162 ns/op	    6725 B/op	     112 allocs/op
BenchmarkComplexJetHTML-16       	 1000000	      3231 ns/op	     532 B/op	       5 allocs/op
PASS
ok  	github.com/SlinSo/goTemplateBenchmark	14.525s
goos: darwin
goarch: arm64
pkg: github.com/SlinSo/goTemplateBenchmark
cpu: Apple M3 Max
BenchmarkComplexEgo-16               	 2791468	      1286 ns/op	     568 B/op	      31 allocs/op
BenchmarkComplexQuicktemplate-16     	 5914053	       603.7 ns/op	       0 B/op	       0 allocs/op
BenchmarkComplexTempl-16             	 4668388	       770.1 ns/op	     408 B/op	      11 allocs/op
BenchmarkComplexFtmpl-16             	 1757655	      2082 ns/op	    3533 B/op	      38 allocs/op
BenchmarkComplexGorazor-16           	 2107204	      1715 ns/op	    3688 B/op	      24 allocs/op
BenchmarkComplexGoh-16               	 9336025	       385.1 ns/op	       0 B/op	       0 allocs/op
BenchmarkComplexHero-16              	 5418055	       660.1 ns/op	       0 B/op	       0 allocs/op
BenchmarkComplexJade-16              	 7880181	       454.1 ns/op	       0 B/op	       0 allocs/op
BenchmarkComplexGoDirectBuffer-16    	13688589	       263.0 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/SlinSo/goTemplateBenchmark	40.892s

See #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant