On Mer, 2004-06-30 at 13:45, [EMAIL PROTECTED] wrote: > I am developing the DRI driver for s3 latest product DeltaChrome. > XFree86 version is 4.3.0,and gcc is the default in redhat9.0, > and the output of "gcc -v" is: > cc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > > Furthermore,if I enable -O2 flag,the FPS of quake3 can improve about 30frames. > I am very curious why gcc can help to improve it so drastically?
The basic gcc output is not that heavily optimised. gcc -O2 turns on a lot more optimisation including loop unrolling. It also helps with floating point which matters a lot with Mesa. In some situations I've found gcc -Os (optimise for size) can lead to even faster code. With regard to S J Hill's question - one thing that we've seen with the kernel is that gcc -O2 because it inlines becomes smart enough to eliminate a lot more code or re-order it. That can lead to problems if hardware mappings are not declared volatile. Alan ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
