in reply to Perl Data Structures

The main problem with coding things like trees in Perl, is not (so much), performance, but memory usage.

In C, a simple RB-tree node might require 20 (64-bit:40) bytes of ram. Doing the same in terms of Perl's built-in data structures will consume anything from 336 to 512 bytes. (64-bit Perl).

That order of magnitude increase in memory usage severally limits the size of tree you can deal with, even before you get to the performance aspect.

And anything you do to lessen the memory usage is a further direct hit on performance.


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