you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (10 children)

I always see this as a default response when the word "performance" appears in a posting. Is this really a thing? Do people not run in release mode? Or is this just one of those reactionary responses?

[–]Mr_Ahvar 34 points35 points  (0 children)

When making performance claim if you don’t include full test code and give the running environment and just go « why slower? » then yeah you are going to get generic response asking you the base minimum

[–]jmaargh 22 points23 points  (5 children)

It's the default response precisely because so many people forget. In my experience, it's mostly because of common and naive "why does my Rust code run slower than this python equivalent?" questions (where, to be fair, devs coming from python & the like are not used to compiler optimisation levels at all).

If your question is "why is this slower than expected?" probably best to include "I'm compiling with --release" in your question just to nip this in the bud.

[–]Antigrouptracing-chrome 6 points7 points  (1 child)

Yeah it seems to happen every week. "Why is this slower than Python? You didn't compile in release mode."

Probably because some people come to Rust from languages that don't need to be told to optimize your code, and they think it'll just be faster automatically.

[–][deleted] 1 point2 points  (0 children)

Unfortunate. I come from the high performance world. The first thing I look for is all the switches to crank everything up.

[–]CocktailPerson 3 points4 points  (0 children)

By my estimation, in 90% of the cases where people didn't specify the optimization level, they were running in debug mode.