A year and a half ago when I release 0.72, the preponderance of people were running 32-bit and 8192 was already double what they required (most 32-bit processes are limited to 2GB and 8192 allows for 4GB). And even most 64-bit systems maxed at 4GB.

But, Moore's law moves inexorably on, and 8GB is probably about right to cover the next couple of years or so. If I decide to release a forked version, I will increase the default to 16384. I have been waiting for the appearance of *a* bug against the current version, but none has emerged..

There is a bug report, raised against 0.71, that also affects 0.72, but I consider that a bug (or rather, a regression), in the perl core. This because the the "bug" did not happen prior to the 5.10 release; and because it affects (and afflicts) other core-only code, quite outside of 0.72.

As such, patching D::S to fix this is a mere band-aid that would have to be replicated by every other module and program that uses $#array.

The obvious, simple and correct solution to that problem is to regress the core change that promiscuously converted every reference to $#somearray into a costly (and often pointless) application of 'magic', whether it was required or not.

Viz.

0] Perl> @a = map [], 1 .. 1e6;; 0] Perl> ## At this point, the process is using 195MB RAM.;; 0] Perl> $s = $#{ $_ } for @a;; 0] Perl> ## At this point, the process is using 395MB RAM.;;

It is patently f****** ridiculous that simply checking the size of an array, costs 200 bytes of memory.

Even more ridiculous, is that the raiser of the "bug", who is entirely competent to be aware of this, couldn't see past his own prejudices, and raised the "bug" against D::S, rather than as a regression against the core. But that is just par for the course.

And if that sounds bitter, it's because it is. And that tempts me to post a meditation that has been brewing in my head for 3 or 4 years now. Provisional title: "This community is as fractured and dysfunctional--and living in the same denial--as the USSR was in the late 1989 and early 1990."

If you want to read that meditation, then it is not enough to vote yah or nah. You will also have to encourage all your friends to vote. Because that post will only materialise if the absolute(*) vote of this post is >50.

Ie. Unless the vote tally for this post reaches greater than +|- 50, I will not make the meditation.

(*)Explanation of the logic behind making this an absolute limit available by /msg on request.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

In reply to Re^5: Finding memory usage of perl structure efficiently by BrowserUk
in thread Finding memory usage of perl structure efficiently by dpavlin

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.