in reply to Re: exists *{$glob} ? (+)
in thread exists *{$glob} ? (+)

That leaves a couple of questions:

  1. If you were writing the program over, would you use the same strategy of thousands of classes, or might you switch to a more conventional scheme?
  2. Can you imagine writing a program that would use more than 8000 classes and need more than 500k instances of any single class active concurrently?

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.
Re^3: exists *{$glob} ? (+)
by dragonchild (Archbishop) on Sep 09, 2004 at 18:17 UTC
    1. As I didn't have a database I could use, then I would definitely use that scheme. Ideally, I would've stored everything in a database.
    2. 8k classes? Yes, in the kind of situation I described earlier. 500k instances? Uhhh ... assuming you used 1k of RAM per instance, which is a lowball estimate, you would need 500M of RAM, just for those objects. If you're doing something that resource-intensive, you probably need it to actually complete running before the Sun dies. So, you're probably not writing it in Perl. Either that or you should've use a database.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

    I shouldn't have to say this, but any code, unless otherwise stated, is untested