in reply to Re^5: profiling XS routines
in thread profiling XS routines
As for the timings, I've done such comparisons before on other machines and other operating systems - eg on my aging linux box (Pentium-III) running the same script (but with 10 iterations instead of 1) I get 0.42 for 'list' and '0.49' for 'ref'. Whenever I've run this sort of comparison, I've found very little difference. Given that you're measuring such miniscule amounts of time, it might be more meaningful if you were to run (say) 30 iterations instead of 1 - ie:/* macros to define bit-fields in structs. */ #ifndef PERL_BITFIELD8 # define PERL_BITFIELD8 unsigned #endif #ifndef PERL_BITFIELD16 # define PERL_BITFIELD16 unsigned #endif #ifndef PERL_BITFIELD32 # define PERL_BITFIELD32 unsigned #endif
I don't know why this AMD64 (Vista64) timing is so slow in comparison to your box and my aging linux box .... didn't realise it *was* so slow until now....timethese (30, { 'list' => '$list = sum_as_list(@x);', 'ref' => '$ref = sum_as_ref(\@x);', });
|
|---|