A small but efficient, intuitive and responsive OCaml IDE right in your browser! Ships OCaml v5.1.1, interpreter by your browser (so it works offline!), compiled with js_of_ocaml.
Hi there,
I recently tested on your version the latest v5.1+ version, with the following piece of code:
let rec binom k n =
if k < 0 || k > n then 0
else if k = 0 || k = n then 1
else binom k (n - 1) + binom (k - 1) (n - 1)
;;
let debut = Sys.time() in
let b_15_30 = binom 15 30 in
let fin = Sys.time() in
Printf.printf "binom 15 30 a pris %g secondes\n" (fin -. debut);
b_15_30;;
Is there any reason for such a large difference?
I don't have a v5+ OCaml toplevel installed locally and won't install it now, so I can't test offline, but the difference seems huge.
Thanks for the answer, if you have any idea why :smile: !
Hi there, I recently tested on your version the latest v5.1+ version, with the following piece of code:
It gives about 3.5 seconds on http://ocaml.besson.link/, hosting the version 4.14.1 of BetterOCaml, and about 16.117 seconds on your most recent version on https://jbdoderlein.github.io/BetterOCaml/?version=5.1.1.
Is there any reason for such a large difference? I don't have a v5+ OCaml toplevel installed locally and won't install it now, so I can't test offline, but the difference seems huge.
Thanks for the answer, if you have any idea why :smile: !