Odd performance difference

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Oct 25 10:51:29 PDT 2012


On Thu, Oct 25, 2012 at 10:46:47AM -0700, H. S. Teoh wrote:
> Since compiling every source file I have in a single command causes GDC
> to ICE, I decided to experiment with compiling the files in batches.
> Turns out I can do it in two batches without crashing GDC:
> 
> 	gdc ${first_seven_files} -o a.o
> 	gdc ${second_six_files} -o b.o
> 	gdc a.o b.o -o program
> 
> Here's the odd thing. The resulting program is much smaller than if I
> compiled every .d file separately, about 30% smaller. But the smaller
> program consistently runs about 3x slower than the larger one. Why is
> that?
[...]

Actually, ignore that. My test was invalid because I forgot to pass the
-O flag in the batch compilations. Once I do that the resulting
executables are more-or-less equal in performance. Sorry for the false
alarm!


T

-- 
Public parking: euphemism for paid parking. -- Flora


More information about the D.gnu mailing list