On 07/13/2009 03:35 PM, Mark Wielaard wrote: > This is really a shame, gcc is really a lot slower compiling with -O2. > It would be good to find some other way to make pass 4 quicker by > default. Another approach mentioned on IRC is trying to simplify the code that we present to GCC. I took a stab at consolidating the probe locking code, patch attached. It makes each probe body contain just a static array of locks needed, and then call to a single function that actually loops over the locks. This will only be a win for scripts with many distinct probe bodies, like topsys.stp. For that script, I see pass-4 time go from 5 seconds to 4.4 seconds. In runtime, it's hard to get consistent measurement, but the average probe time is about 2-3% slower. So, is that overhead worth 1/2 second compile time? Can anyone see ways to improve this patch, or suggest other areas that could benefit from focus? Josh