Proebsting's Law

Paul Makepeace london.pm.org at paulm.com
Wed Dec 14 12:00:23 GMT 2005


Perl people cry "benchmark!" (or pedantically, "profile!") as soon as
optimizations are mentioned but has anyone here actually done it with
gcc??

Pick some code, gcc -O3 and gcc it and run them.

I bet there's *much* more than 4% difference[1]. Ten years ago I was
futzing around with assembly code generated for sparcs, comparing various
optimizations. The differences were orders of *magnitude* not percentage
points. In fact some of the optimizations appeared to me so clever I
could barely follow the assembly language despite it being only about six
lines of math & pointer arithmetic in C.

Paul

[1] who apols in advance if someone has already done this or I've missed
the point; /me might not be following this thread perfectly

-- 
Paul Makepeace .............................. http://paulm.com/inchoate/

"If surrealism wasn't art, then blood amd guts will fill your rivers."
   -- http://paulm.com/toys/surrealism/


More information about the london.pm mailing list