in reply to array overhead
If you join your six values into a string rather than an array, you'll save a substantial amount of memory whilst leaving the individual values quickly retrievable:
$x = [ 123.45, 123.456, 123,456,789,012 ];; print total_size( $x );; 384 $y = "123.45,123.456,123,456,789,012";; print total_size( $y );; 80
YOu might save a little more by packing them, but not much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array overhead
by Fletch (Bishop) on Jan 05, 2011 at 21:51 UTC | |
by BrowserUk (Patriarch) on Jan 05, 2011 at 22:23 UTC |