phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
16
benchmarks/bench_box_create_destroy_small.hako
Normal file
16
benchmarks/bench_box_create_destroy_small.hako
Normal file
@ -0,0 +1,16 @@
|
||||
// Interpreter-level microbench: Box create + drop (small loops for time-boxed runs)
|
||||
static box Main {
|
||||
main() {
|
||||
local i = 0
|
||||
local total = 0
|
||||
loop(i < 10000) { // 1e4 iterations
|
||||
{
|
||||
local tmp = new StringBox("x")
|
||||
total = total + tmp.length()
|
||||
}
|
||||
i = i + 1
|
||||
}
|
||||
return total
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user