Why system gcc that is 4.2.1 produces different code than gcc-4.2.1 compiled from sources?

Michaël Grünewald michael.grunewald at laposte.net
Sun Apr 25 19:41:57 UTC 2010


Leonidas Tsampros wrote:
> I'm pretty sure that a small difference in execution time does not mean
> that the produced code is different.

Actually, execution time of a process is very sensitive to the 
environment of this process. See for instance:

http://www-plan.cs.colorado.edu/diwan/asplos09.pdf
   "We see that something external and orthogonal to the program,
    i.e., changing the size (in bytes) of an unused environment variable,
    can dramatically (frequently by about 33% and once by almost 300%)
    change the performance of our program."

(The quotation is taken out of the article.)

I learned about this in a message from Xavier Leroy to the OCaml mailing 
list:

http://caml.inria.fr/pub/ml-archives/caml-list/2009/12/e261eeb95bec6c5a2791335c84234a05.en.html

Cheers,
Michaël


More information about the freebsd-questions mailing list