A script was used to run the 300 iterations while increasing an env variable by one byte between each iteration. This varying variable reveals the alignment problem by way of the cyclical hog shown as spikes in the charts. Also note the "floor" in some of the charts is twice as high as in other charts. this indicates the program is taking more than twice as long to run in that specific env irrespective of the spikes.
The program was compiled several different ways using gcc 295 and gcc 333 on FreeBSD 4.9 and FreeBSD 5.2. The Frankenstein run was based on an object file compiled with gcc 3.3.3 on FreeBSD 5.2 but linked with GNU ld version 2.12.1 in FreeBSD 4.9 and then run on FreeBSD 5.2 and performed without any problems.
While different optimization flags resulted in different performance numbers, no optimization I could find corrected the either the high floor or cyclical hogs exhibited when the program was linked in the FreeBSD 5.2 env.
Both the FreeBSD 4.9 and 5.2 were installed from the www.freebsd.org web site's iso CD images and not modified in any manner for the charts shown below. Kernel tweaks were attempted but did not result in any performance improvements and expectedly so in view of what the Frankenstein run shows below.
Notes:
All with -static -DUNIX -O4 compiled and run on Intel D845GEB m/b w/ P4 1.7 GHz CPU
"5.2gcc295" references the /usr/ports/lang/gcc295 product built on 5.2
"4.9gcc295" references the native gcc/cc installed in FreeBSD 4.9






