News for hackers. Stuff that matters.
Re:Make LLVM Fast Again by worldsayshi on Monday May 11, 2020 @04:18AM (#23139964)
Yeah this seems like two very different use cases. Stating the obvious: when debugging I want as fast builds as possible. When shipping I want as fast software as possible.
Re:Make LLVM Fast Again by bflesch on Monday May 11, 2020 @05:06AM (#23140212)
The only problem being if you want to debug the optimized code ;)
Re:Make LLVM Fast Again by khalladay on Monday May 11, 2020 @07:59AM (#23141171)
This is true a lot in games - often the "debug" version of a game is literally too slow to reproduce issues, so you have to work with the optimized builds.

...even if the actual debugging would be much easier with a debug build.

Re:Make LLVM Fast Again by bluGill on Monday May 11, 2020 @09:05AM (#23141638)
Understood. However even then I would hope that games have unit tests and other module tests that can run just a subset of code and not the entire game. When I'm writing code I want to know it builds and the basics work before I run the entire program.

I work on seasonal programs. I can only do fully realistic tests in the month of April (depending on the weather it shifts a few weeks) , meaning my window to test is closed for the next 11 months. I have learned to find ways to run my code in less realistic situations.

Re:Make LLVM Fast Again by steerablesafe on Monday May 11, 2020 @10:03AM (#23142237)
There are also those bugs that only manifest in the release build.
Re:Make LLVM Fast Again by bluGill on Monday May 11, 2020 @09:07AM (#23141653)
That happens, but fortunately not often. Most problems show up in either optimized or unoptimized code. If it is in optimized code only it is a compiler bug (rare but I have seen it) or a race condition that won't show up in the debugger either. (there are a few more choices but the above are the big ones in my experience)
Re:Make LLVM Fast Again by compiler-guy on Monday May 11, 2020 @10:45AM (#23142671)
In optimized code, it is far more likely that one has a programming error in one's source code that an aggressive optimization revealed, rather than a bug in an industrial compiler. For example, an uninitialized variable that ends up sharing a memory location with some other variable whose life-time doesn't overlap in optimized mode rather than having its own memory location without optimization.

That one is caught be a warning, but there are thousands of possible errors that can be exposed this way.

Compilers have bugs all the time, but code in a write-test-debug-cycle typically has many more.

Re:Make LLVM Fast Again by ludamad on Monday May 11, 2020 @11:18PM (#23150261)
Which is why equally aggressive debug checks are important