Alt-Math-Prime-FastSieve-Inline

 view release on metacpan or  search on metacpan

t/04unique_sieves.t  view on Meta::CPAN

## no critic(RCS,VERSION,explicit,Module,ProhibitMagicNumbers)
use strict;
use warnings;

use Test::More;

use Math::Prime::FastSieve qw( primes );

# A test in Inline::CPP v0.33_009 looked like one object instance might be
# binding to another object instance's data.  This test is to verify that's
# not happening here.

note('Testing that multiple sieve objects bind properly.');

# Build a list of sieve sizes and number of primes in a given sieve.
my %quantities;
foreach my $sieve_size ( 0, 2, 3, 5, 7, 11, 13, 17, 19, 23 ) {
    $quantities{$sieve_size} = scalar @{ primes($sieve_size) };
}



( run in 0.553 second using v1.01-cache-2.11-cpan-5467b0d2c73 )