in reply to Null-stripping performance
You'd almost certainly be faster to unpack the entire string into an array once and then just index into the array:
my @numbers = unpack '(a4)*', $string;; ## Requires 5.8.x sub fetchOne { my $index = shift; return $numbers[ $index ]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Null-stripping performance
by qiau (Initiate) on Feb 26, 2007 at 13:52 UTC | |
by BrowserUk (Patriarch) on Feb 26, 2007 at 15:45 UTC |