by Dewie · 11y ago · 0 comments
There is this misunderstanding between implementations and languages where people equate whatever they have installed on their computer with all implementations of the said language.
Also not knowing about profilers and optimization flags.
So yeah, it is sad.
$ rustc --release prog.rs
error: Unrecognized option: 'release'.
There is a -O for optimization, it is equivalent to -C opt-level=2.EDIT: Oh, cargo build does have a --release which seems to be equivalent to -C opt-level=3, which I guess is even better.
Alternatively, don't have a default and let people opt-in to whatever default they like. That forces people to actually make a choice, instead of being lazy and publishing poor benchmarks without having even looked up what optimization knobs there are to turn on or off.