Files
hakorune/benchmarks/bench_aot_len_light.hako

18 lines
328 B
Plaintext

// AOT-safe microbench: call String.length() many times
static box Main {
len1(s) {
return s.length()
}
main() {
local s = new StringBox("nyash")
local i = 0
local total = 0
// ~10k iterations (軽量)
loop(i < 10000) {
total = total + me.len1(s)
i = i + 1
}
return total
}
}