Hello
I ported a Windows program to my mac and realised the program that took
around 5 seconds to run on Windows now takes atleast 1 minute on my mac. It
uses alot of STL (string, vecor, map, list) but I cant imagine the STL
implementation to be that slow. So I wonder if there are any profiling tools
which could help me find out where the time is beeing spent. So far I went
on with gdb but realised it didn't really help me too much.
Any recommendations are welcome.
Regards,
John
Miro Jurisic - 26 Oct 2004 21:04 GMT
> I ported a Windows program to my mac and realised the program that took
> around 5 seconds to run on Windows now takes atleast 1 minute on my mac. It
> uses alot of STL (string, vecor, map, list) but I cant imagine the STL
> implementation to be that slow. So I wonder if there are any profiling tools
> which could help me find out where the time is beeing spent. So far I went
> on with gdb but realised it didn't really help me too much.
You can start with Sampler, which is installed as part of Apple developer tools.
Beyond that, download CHUD from <http://developer.apple.com/tools/performance/>.
hth
meeroh

Signature
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Reinder Verlinde - 26 Oct 2004 21:27 GMT
> Hello
>
[quoted text clipped - 6 lines]
>
> Any recommendations are welcome.
<http://developer.apple.com/tools/shark_optimize.html>
Reinder
Mike Hall - 27 Oct 2004 01:57 GMT
> ... I wonder if there are any profiling tools
>which could help me find out where the time is beeing spent.
If you're working from the command line, then try the "-pg" option of the compiler.
Run the binary, and then use 'gprof' to look at what routines took all the time
(among other statistics). See the 'gprof' manual page.