Skip to content

Bug: OCaml timings are wrong. #312

Description

@craff

Language (if applicable)

OCaml

Description

I can not reproduce your ocaml's timing by far. On the site it is 5x slower than C which is simply wrong. Here is a test on my machine

raffalli@oulala2:~/Programming/speed-comparison/src$ ocamlopt -O3 leibniz.ml -o leibniz_ocaml.exe
raffalli@oulala2:~/Programming/speed-comparison/src$ gcc -O3 leibniz.c -o leibniz_c.exe
raffalli@oulala2:~/Programming/speed-comparison/src$ time ./leibniz_c.exe 
3.1415926545880506

real    0m0,857s
user    0m0,853s
sys     0m0,004s
raffalli@oulala2:~/Programming/speed-comparison/src$ time ./leibniz_ocaml.exe 
3.1415926525897171

real    0m0,857s
user    0m0,853s
sys     0m0,004s

Expected Behavior

Timing between 1~1.5 time compared to C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions