in reply to My scalars swell
I've noticed (in perl 5 point something) that this reduces memory consumption by a noticable amount. It won't save your skin, but it will shave a bit off the top.[0+$1,$2,0+$3,0+$4,0+$5,0+$6]
In the below brief test, the pure numbers version takes up 5656k, the stringified takes up 9560k.
-jackdied#!/usr/bin/perl use strict; my @foo = (0..100000); foreach my $f (@foo) { # comment/uncomment the next line to change behaviors $f = '' . $f; } sleep(10); exit(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: My scalars swell
by clintp (Curate) on Oct 20, 2001 at 21:52 UTC | |
by jackdied (Monk) on Oct 21, 2001 at 01:11 UTC |