It might be float boxing. See OCaml speed comparison - calculating pi with Leibniz - optimize? - #2 by copy