3 ms·
> Surely you are kidding. If that were true, why doesn't OCaml curb-stomp C in benchmarks? Exactly because nobody (except backend writers) can predict what C c
by atilaneves 7y ago
> Surely you are kidding. If that were true, why doesn't OCaml curb-stomp C in benchmarks?
Exactly because nobody (except backend writers) can predict what C compiler backends emit, especially when abusing undefined behaviour.
- madmax96 7y agoOCaml: https://godbolt.org/z/8bWDXy https://godbolt.org/z/8bWDXy C: https://godbolt.org/z/WAjsvk https://godbolt.org/z/WAjsvk I've never actually looked at the output of an OCaml compiler, I have to say I'm surprised by how clean it is. But I wouldn't call it more predictable than that C's output.
- ernst_klim 7y ago>C You forgot about -O2/3.