Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: profiling XS routines

by syphilis (Archbishop)
on Aug 27, 2009 at 13:02 UTC ( [id://791623]=note: print w/replies, xml ) Need Help??


in reply to profiling XS routines

In the absence of something more sophisticated, I'd be grabbing the clock() values at various points, and using that to work out where the time is being spent.

The function is defined in time.h and (double)clock()/CLOCKS_PER_SEC should give you the time in seconds. As I understand it, clock() itself returns the number of cpu cycles that have been run since the program began execution.

But, of course, this is perl and there may well be something "more sophisticated".

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-18 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found