Am 31.05.2013 19:21, schrieb Rob T:
On Friday, 31 May 2013 at 16:52:53 UTC, Jonathan M Davis wrote:
On Friday, May 31, 2013 18:05:16 Rob T wrote:
I've seen this happen with 2.062, if you take out -noboundscheck
it may reduce the size significantly and compile a lot faster.
Makes no sense.
My first guess would be that more ends up being inlined with
-noboundscheck due
to the differences in the code that's being generated, but I really
don't knw.
- Jonathan M Davis
I discovered this last night while playing around with the raytrace
performance issue a few threads back. I noticed that Derelict was being
built without -noboundscheck so I put the flag in to see what if
anything would happen.
The difference is from a few kilobytes per lib to a few megabytes per
lib, so it's a drastic increase and it takes a lot more time to build.
This may be something that should be investigated further.
--rt
dmd is not alone in this regard.
There is a presentation from Chandler Carruth on the last LLVM
conference, http://llvm.org/devmtg/2013-04/ where he rants about that in
C++ code.
Basically there are some use cases in C++ where the optimizer currently
does the wrong thing and the generated code increases exponentially.
--
Paulo