Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

First, thanks for the link, thats an interesting site. :-) But i have to quibble a little with this particular example. Obviously the code posted in that link appears hokey. Not using pack/substr or vec for the index string strikes me as a little odd for instance. But the overall strategy represented there is not IMO that crazy. Consider that if you have large numbers of strings such a strategy can greatly reduce the overhead of storing it in perl. Each SV in perl represents a certain amount of space, for the sake of the discussion lets say 20 bytes, versus the 2 - 8 required by a representationg akin to the one mentioned. So if we are storing large numbers of strings this overhead can be quite burdensome. Also, by using such an approach you can grab a large chunk of memory at a single go instead of doing a large number of small allocations. (Its interesting (if a little obvious) to consider that if you have 100k null terminated strings you are using 100k to simply store the end of string point :-)

Anyway i didnt think such comments were worth posting on the site you linked to, but I do think its worth mentioning here.


In reply to Re^3: Basic Coding Tips: Parsimonious Parameterization by demerphq
in thread Basic Coding Tips: Parsimonious Parameterization by dimar

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 the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (4)
    As of 2015-11-27 07:47 GMT
    Find Nodes?
      Voting Booth?

      What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

      Results (719 votes), past polls