******************************************************************************** Timing ******************************************************************************** There is a routine called dyn_now_cycle() in libdyn.a that will return the current reading of the Alpha cycle counter to you. You can use this 31-bit counter to time your code. extern double dyn_now_cycle(); double BeginTime, EndTime; BeginTime = dyn_now_cycle(); { /* the code to time */ ... } EndTime = dyn_now_cycle(); printf("The code took %lf cycles to run.\n", EndTime - BeginTime); You can also use get_time_of_day() or dyn_now_wall() from libdyn.a to perform timing. dyn_now_wall() has the same usage as dyn_now_cycle, but uses get_time_of_day() to get the time, rather than the cycle counter. Pros and cons: get_time_of_day() + no roll-over problem +/- it gives the "real" time, including system time, time when the job isn't even running, etc. - large granularity; very inaccurate when timing short-running code dyn_now_cycle() + most accurate timer on the Alphas (within microseconds?) +/- it only includes user time for the job - it rolls over about every 10 seconds These routines are used to time the setup code and stitcher. The setup code and stitcher add the amount of time they require to the following variables: extern double dyn_setup_wall_time; extern double dyn_setup_cycle_time; extern double dyn_stitcher_wall_time; extern double dyn_stitcher_cycle_time; So, set them to zero before the dynamic region of interest and print out their values after the region. These variables are only set in libtimedyn.a, so link with that library instead of libdyn.a when you want to time your code. Something else important to know is that you can only time the setup code when compiling with the dc version of the compiler (scc -v dc ...) and can only time the stitcher when compiling with the dcm version (scc -v dcm ...).