]> git.vpit.fr Git - perl/modules/Scalar-Vec-Util.git/blobdiff - t/11-veq.t
Speed up vfill_pp()
[perl/modules/Scalar-Vec-Util.git] / t / 11-veq.t
index 418e13e29b0676bdb65481e32cadde19368d521a..3d141b35c052572ac0149fb28d87cad13f238f14 100644 (file)
@@ -23,7 +23,11 @@ $p = 8 if $p < 8;
 my $n = 3 * $p;
 my $q = 1;
 
-*myfill = *Scalar::Vec::Util::vfill_pp;
+sub myfill {
+ (undef, my $s, my $l, my $x) = @_;
+ $x = 1 if $x;
+ vec($_[0], $_, 1) = $x for $s .. $s + $l - 1;
+}
 
 sub rst { myfill($_[0], 0, $n, 0) }