Comment by galangalalgol
Comment by galangalalgol 2 days ago
I keep ignoring nim for some reason. How fast is it with all the checks on? The benchmarks for it julia, and swift typically turn off safety checks, which is not how I would run them.
Comment by galangalalgol 2 days ago
I keep ignoring nim for some reason. How fast is it with all the checks on? The benchmarks for it julia, and swift typically turn off safety checks, which is not how I would run them.
In Julia, at least, bounds checks tend to be a pretty minor hit (~20%) unless the bounds check gets in the way of vectorization
Since anything/0 = infinity, these kinds of things always depend upon what programs do and as a sibling comment correctly observes how much they interfere with SIMD autovectorization and sevral other things.
That said, as a rough guideline, nim c -d=release can certainly be almost the same speed as -d=danger and is often within a few (single digits) percent. E.g.:
Of course, as per my first sentence, the best benchmarks are your own applications run against your own data and its idiosyncratic distributions.EDIT: btw, /t -> /tmp which is a /dev/shm bind mount while /n -> /dev/null.