feat(test): add foldl benchmark test

This commit is contained in:
Jesse-Cameron 2022-09-20 15:38:43 +10:00 committed by Stanisław Barzowski
parent c450a168d4
commit 953327b03c
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,3 @@
local input = std.makeArray(10000, function(i) 'xxxxx');
std.foldl(function(acc, value) acc + value, input, '')

View File

@ -67,3 +67,7 @@ func Benchmark_Builtin_comparison(b *testing.B) {
func Benchmark_Builtin_comparison2(b *testing.B) { func Benchmark_Builtin_comparison2(b *testing.B) {
RunBenchmark(b, "comparison2") RunBenchmark(b, "comparison2")
} }
func Benchmark_Builtin_foldl(b *testing.B) {
RunBenchmark(b, "foldl")
}