create Language::Befunge::Storage::Generic::Vec, and test it.
commit1500b1f5e0646f6d0201f5211de3e17afd4d77b5
authorMark Glines <mark@glines.org>
Sun, 8 Jun 2008 13:51:43 +0000 (8 06:51 -0700)
committerMark Glines <mark@glines.org>
Sun, 8 Jun 2008 13:51:43 +0000 (8 06:51 -0700)
treec1bd969d7787f3cb308952fff7b45e038914bde2
parent034f1343dc31b7b35805e6318e5de93c78929ae8
create Language::Befunge::Storage::Generic::Vec, and test it.

This is similar to Generic::AoA, except that it stores the data in a
large string buffer.

This module is more space-efficient than AoA.pm, especially for
larger numbers of dimensions, because it does not need to store any
tree structure.  However, in pure-perl it is 30% slower than AoA.pm
(based on the execution time of the test scripts for each), mainly
because vec() operates on unsigned integer values, and therefore,
every low level operation has to go through a conversion routine to
adjust the signedness by hand.

LBSGVXS does not have this problem.  This patch also includes support
for the accelerated LBSGVXS module (which I will release separately
on CPAN).

With LBSGVXS, LBSGV performs quite well (better than Generic::AoA and
2D::Sparse in many cases).
Changes
lib/Language/Befunge/Storage/Generic/Vec.pm [new file with mode: 0644]
t/1-classes/storage-generic-vec.t [new file with mode: 0644]