in reply to Faster creation of Arrays in XS?
Why not skip the AoAs and return a string with two delimiters? eg. "3:4 6:3 8:3";
It seems to be just as easy, and probably faster to do:
my $diffs = diff( .... ); for my $diff ( split ' ', $diffs ) { my( $start, $len ) = split ':', $diff; ## use start / len }
As it is:
my $ref = diff( ... ); for my $pair ( @{ $ref } ) { my( $start, $len ) = @{ $pair }; ## use start / len }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Faster creation of Arrays in XS?
by wollmers (Scribe) on Jun 21, 2015 at 20:56 UTC | |
by BrowserUk (Patriarch) on Jun 21, 2015 at 21:20 UTC |