Welcome to the Performance Optimization mailing list, and what better
way to welcome you than to announce a new release of Shark!
Xavier,
Thanks for the welcome and the new release of the CHUD tools. I've
been using the 4.0 betas and it is a great improvement over 3.x. Let
me also say thank you Apple for providing this list. I think that it
will be a great developer resource.
I'd like to share a quick Shark's tale. I was recently given the task
of optimizing some code (that wasn't mine) and the first thing I did
(the first thing anyone should do) was run it through Shark. Shark
quickly told me right where the slowdown was. It turned out to be a
horribly inefficient table lookup. Rather than using some kind of
hashtable or tree, the lookup was doing a linear search over about 4000
elements.
I changed the implementation to use a highly optimized hashtable and
the results were great. It's now about 27x faster on a DP 800MHz G4
and about 37x faster on a DP 2.0GHz G5. Shark led me right to the
hotspot and helped me recognize why the algorithm was so slow.
To everyone out there, if you're not using Shark, what are you waiting
for? Shark is by far the best and easiest way to figure out where your
performance bottlenecks are.
_____________________________