[Pdx-pm] Software development and The Rules
tex at off.org
Fri Sep 27 00:59:53 CDT 2002
On Thu, Sep 26, 2002 at 10:30:00PM -0700, Joshua Keroes wrote:
> On (Thu, Sep 26 21:10), Austin Schutz wrote:
> > On Thu, Sep 26, 2002 at 05:07:32PM -0700, Joshua Keroes wrote:
> > > I have benchmarks, but I can't coax B::TerseSize to give me the size of
> > > memory in use. (Help, anyone?) Nevertheless, I can make some guesses
> > > about how much memory is in use:
> > >
> > > Memory usage:
> > >
> > > What did we decide was the array memory usage before? 30 MB or
> > > something? This solution uses 122K + Perl overhead, maybe 130K
> > > all told. (!) That's a few orders of magnitude better.
> > >
> > At 14 bits/number * 1000000 phone numbers you are still at a couple
> > megs of data, unless you are doing some sort of internal compression or have
> > figured a way to squeeze each number into a single bit. You're still a couple
> > order of magnitude smaller given my test (below).
> Even less than 14 bits. Much less than 14 bits.
Sounds like a binary tree.
> > Beats me, but perl is supposed to use pretty brainy sort methods
> > (qsort maybe?). I'm sure if you did bitwise stuff in C using a good sort
> > method you could get a faster result.
> Now, you're getting hot!
Are you doing the actual code in perl? C seems like it's a lot faster
for iterative algorithms. Not sure why that is.
More information about the Pdx-pm-list