Files
hakorune/benchmarks/bench_aot_len_heavy.hako

16 lines
356 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// AOT-safe microbench: call String.length() many times (heavy)
static box Main {
len1(s) { return s.length() }
main() {
local s = new StringBox("nyash")
local i = 0
local total = 0
// ~160k iterations重めだが実用時間内
loop(i < 160000) {
total = total + me.len1(s)
i = i + 1
}
return total
}
}