Can you tell me where PERL_BITFIELD16 is typedef'd on your setup

For me, it's in lib/CORE/perl.h:
/* 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
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:
timethese (30, { 'list' => '$list = sum_as_list(@x);', 'ref' => '$ref = sum_as_ref(\@x);', });
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....

Cheers,
Rob

In reply to Re^6: profiling XS routines by syphilis
in thread profiling XS routines by jpl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.