(module bench_mono_dispatch (class Foo (param a) (method foo (type (fn-type (params (own a)) (ret (own (con Int))))))) (instance (class Foo) (type (con Int)) (method foo (body (lam (params (typed x a)) (ret (con Int)) (body (app + (app * x 1103515245) 12345)))))) (class Looper (param a) (method loop_call (type (fn-type (params (own a) (own (con Int))) (ret (own (con Int))))))) (instance (class Looper) (type (con Int)) (method loop_call (body (lam (params (typed i a) (typed acc (con Int))) (ret (con Int)) (body (if (app eq i 0) acc (tail-app loop_call (app - i 1) (app + acc (app foo (app + acc i)))))))))) (fn main (type (fn-type (params) (ret (own (con Unit))) (effects IO))) (params) (body (app print (app loop_call 100000000 0)))))