[Pdx-pm] RE: [Pdx-pm] Software development and The Rules

Curtis Poe cp at onsitetech.com
Wed Sep 25 18:03:15 CDT 2002

----- Original Message -----
From: "Joshua Keroes" <jkeroes at eli.net>

> Nope, that's not it. For one thing, you've just read 1_000_000
> numbers into memory, that's 7 bytes * 1_000_000 of space of the
> disk.
> -Joshua

Whoops!  We're talking Perl here :)  I don't have hard numbers, but I
estimate that a simple scalar in Perl has at least 12 bytes: 4 for the
pointer, 4 for the reference count, 3 for the flags and 1 (?) for the type;
see perlguts for more info.  Abigail has stated that there is actually 24
bytes of overhead per scalar
(http://www.perlmonks.org/index.pl?node_id=190458 -- any Perl internals
gurus care to illuminate me on what I missed?).

As a result, if Abigail's figure is correct, that's 24_000_000 bytes plus
7_000_000 bytes, for a total of 31_000_000 bytes of memory for one million
phone numbers.


More information about the Pdx-pm-list mailing list