Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Whoa, 1 and undef are on par , optimization?
#!/usr/bin/perl -- use Devel::Size qw(size total_size); use strict; use warnings; { my %h; for ( 1 .. 20_000 ){ $h{1}{$_}=1; $h{'$_'}{$_}=$_; $h{'undef'}{$_}=undef; $h{'!undef'}{$_}= !undef; $h{'!!undef'}{$_}= !!undef; $h{'!!!undef'}{$_}= !!!undef; $h{'sv_yes'}{$_}= !0; $h{'sv_no'}{$_}= !1; } printf "%10s %10s %10s\n", 'value', 'size', 'total_size'; printf "%10s %10d %10d\n",$_, size($h{$_}),total_size($h{$_}) for +sort keys %h; }
ActivePerl Build 813, perl, v5.8.7 built for MSWin32-x86-multi-thread
value size total_size !!!undef 660026 1420026 !!undef 660026 1400026 !undef 660026 1420026 $_ 660026 1328920 1 660026 980026 sv_no 660026 1400026 sv_yes 660026 1420026 undef 660026 900026
strawberry-perl- , v5.10.0 built for MSWin32-x86-multi-thread
value size total_size !!!undef 660014 1540014 !!undef 660014 1540014 !undef 660014 1540014 $_ 660014 1616018 1 660014 980014 sv_no 660014 1540014 sv_yes 660014 1540014 undef 660014 980014

In reply to Re^3: Idiom: hashes as sets by Anonymous Monk
in thread Idiom: hashes as sets by vrk

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (7)
    As of 2018-03-23 09:39 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (289 votes). Check out past polls.