view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
examples/oo_vs_func.pl view on Meta::CPAN
sub new { bless { key => 'val' }, shift }
sub do_foo { $_[0] ? $Test::oo++ : $Test::ff++ }
__DATA__
Benchmark: timing 10000000 iterations of Function, Import, OO...
Function: 8 wallclock secs ( 7.99 usr + 0.00 sys = 7.99 CPU) @ 1251251.25/s (n=10000000)
Import: 12 wallclock secs (12.72 usr + 0.00 sys = 12.72 CPU) @ 786225.33/s (n=10000000)
OO: 9 wallclock secs ( 9.33 usr + 0.00 sys = 9.33 CPU) @ 1071352.05/s (n=10000000)
OO 10000000
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
// the bitvector where we'll start xoring
size_t vectorArrayIndex = pqx->shiftSoFar / 64;
// the position within the bit vector at which we begin xoring
int vectorOffset = pqx->shiftSoFar % 64;
size_t iterations = addSize > pqx->kWidthInBits ? pqx->kWidthInBits : addSize;
for (size_t i = 0; i < iterations; ++i) {
size_t nextCell = vectorArrayIndex + 1;
int bitsInVectorCell = 64;
if (nextCell == pqx->kDataLength) {
nextCell = 0;
if (pqx->kWidthInBits % 64 > 0) {
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
ex/benchmark.pl view on Meta::CPAN
use Digest::Shabal ();
use Digest::Skein ();
use Digest::Whirlpool ();
my %opts = (
iterations => -1,
size => 1, # kB
);
GetOptions(\%opts, 'iterations|i=i', 'size|s=f',);
my $data = '01234567' x (128 * $opts{size});
my %digests = (
blake_224 => sub { Digest::BLAKE::blake_224($data) },
view all matches for this distribution
view release on metacpan or search on metacpan
digest-benchmark view on Meta::CPAN
use strict;
use Benchmark qw/ cmpthese /;
use Getopt::Long qw/ GetOptions :config no_ignore_case /;
my %opts = (
iterations => 100, # number of iterations
size => 0.5, # data size in MB
);
GetOptions( \%opts, 'iterations|i=i', 'size|s=f', );
my $data = "abcdefghij" x ( $opts{size} * 100_000 );
use Digest ();
use Digest::Skein ();
digest-benchmark view on Meta::CPAN
# pre-load everything just in case
$_->() for values %algo;
# run the benchmark
cmpthese( $opts{iterations}, \%algo, );
# vim: ts=4 sw=4 noet
view all matches for this distribution
view release on metacpan or search on metacpan
src/SpookyV2.h view on Meta::CPAN
// with probability 50 +- .3%
// For every pair of input bits,
// with probability 50 +- 3%
//
// This does not rely on the last Mix() call having already mixed some.
// Two iterations was almost good enough for a 64-bit result, but a
// 128-bit result is reported, so End() does three iterations.
//
static INLINE void EndPartial(
uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3,
uint64 &h4, uint64 &h5, uint64 &h6, uint64 &h7,
uint64 &h8, uint64 &h9, uint64 &h10,uint64 &h11)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Digest/ssdeep.pm view on Meta::CPAN
push @last7chars, $char;
$roll_h2 += 7 * $char - $roll_h1;
$roll_h1 += $char - $char7bf;
$roll_h3 <<= 5; # 5*7 = 35 (so it vanish after 7 iterations)
$roll_h3 &= 0xffffffff;
$roll_h3 ^= $char;
#printf("c=%d cAnt=%d H1=%u H2=%u H3=%u\n",
# $char, $char7bf,
view all matches for this distribution
view release on metacpan or search on metacpan
ext/xxHash/README.md view on Meta::CPAN
- `XXH_VECTOR` : manually select a vector instruction set (default: auto-selected at compilation time). Available instruction sets are `XXH_SCALAR`, `XXH_SSE2`, `XXH_AVX2`, `XXH_AVX512`, `XXH_NEON` and `XXH_VSX`. Compiler may require additional flags...
- `XXH_PREFETCH_DIST` : select prefetching distance. For close-to-metal adaptation to specific hardware platforms. XXH3 only.
- `XXH_NO_PREFETCH` : disable prefetching. Some platforms or situations may perform better without prefetching. XXH3 only.
#### Build modifiers for `xxhsum` CLI
- `XXH_1ST_SPEED_TARGET` : select an initial speed target, expressed in MB/s, for the first speed test in benchmark mode. Benchmark will adjust the target at subsequent iterations, but the first test is made "blindly" by targeting this speed. Current...
#### Makefile variables
When compiling the Command Line Interface `xxhsum` using `make`, the following environment variables can also be set :
- `DISPATCH=1` : use `xxh_x86dispatch.c`, select at runtime between `scalar`, `sse2`, `avx2` or `avx512` instruction set. This option is only valid for `x86`/`x64` systems. It is enabled by default when target `x86`/`x64` is detected. It can be force...
- `LIBXXH_DISPATCH=1` : same idea, implemented a runtime vector extension detector, but within `libxxhash`. This parameter is disabled by default. When enabled (only valid for `x86`/`x64` systems), new symbols published in `xxh_x86dispatch.h` become ...
view all matches for this distribution
view release on metacpan or search on metacpan
# return $ref->NEXTKEY(); # next
#}elsif($key =~ m/^ARRAY){
# return $ref->NEXTKEY(); # next
}else{
# per-container metadata does not
# appear in iterations through data.
return $ref->NEXTKEY(); # next
}
};
wantarray or return $key;
return @{[$key, $ref->FETCH($key)]};
view all matches for this distribution
view release on metacpan or search on metacpan
Storable.pm view on Meta::CPAN
# return $ref->NEXTKEY(); # next
#}elsif($key =~ m/^ARRAY){
# return $ref->NEXTKEY(); # next
}else{
# per-container metadata does not
# appear in iterations through data.
return $ref->NEXTKEY(); # next
}
};
wantarray or return $key;
return @{[$key, $ref->FETCH($key)]};
view all matches for this distribution
view release on metacpan or search on metacpan
# return $ref->NEXTKEY(); # next
#}elsif($key =~ m/^ARRAY){
# return $ref->NEXTKEY(); # next
}else{
# per-container metadata does not
# appear in iterations through data.
return $ref->NEXTKEY(); # next
}
};
wantarray or return $key;
return @{[$key, $ref->FETCH($key)]};
view all matches for this distribution
view release on metacpan or search on metacpan
t/integration/12-randfile.t view on Meta::CPAN
plan tests => 109;
# I run local tests of 512 or more to exhaust the chances entropy is causing
# tests to pass that might fail on client machines
# 20 should suffice for clients downloading from CPAN
my $loop_iterations = 20;
my $temp = Directory::Scratch->new;
ok( my $rfile = $temp->randfile, "randfile()" );
ok( length($rfile), "randfile() returned a string" );
ok( -e $rfile, "file exists" );
ok( unlink($rfile), "file unlink() succeeds" );
$rfile = undef;
sub test_iterations {
for my $i (1..$loop_iterations) {
ok( $rfile = $temp->randfile( 1024, 2048 ), "$i: randfile( 1024, 2048 )" );
my $size = -s $rfile;
ok( -e $rfile, " $i: File exists." );
cmp_ok( $size, '>=', 1024, " $i: size of file: $size > 1024" );
cmp_ok( $size, '<=', 2048, " $i: size of file: $size < 2048" );
}
}
test_iterations();
my $j = 1;
for ( my $i=1; $i<=1000000; $i *= 10 ) {
ok( my $file = $temp->randfile($j, $i), "randfile($j, $i)" );
my $size = -s $file;
view all matches for this distribution
view release on metacpan or search on metacpan
support/perltidyrc view on Meta::CPAN
# I/O control
--add-terminal-newline
--character-encoding=utf8
--iterations=2
--output-line-ending=unix
--perl-best-practices -nst -nse
# Basic formatting options
view all matches for this distribution
view release on metacpan or search on metacpan
-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
view all matches for this distribution
view release on metacpan or search on metacpan
-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/GitSetup.pm view on Meta::CPAN
last;
}
$dir = $dir->parent;
}
continue {
die "too many iterations when traversing $tempdir!"
if $count++ > 100;
}
ok(!$in_git, 'tempdir is not in a real git repository');
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/GitSetup.pm view on Meta::CPAN
last;
}
$dir = $dir->parent;
}
continue {
die "too many iterations when traversing $tempdir!"
if $count++ > 100;
}
ok(!$in_git, 'tempdir is not in a real git repository');
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/GitSetup.pm view on Meta::CPAN
last;
}
$dir = $dir->parent;
}
continue {
die "too many iterations when traversing $tempdir!"
if $count++ > 100;
}
ok(!$in_git, 'tempdir is not in a real git repository');
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Deployer/Image/PNG.pm view on Meta::CPAN
required => 1
);
has 'iterations' => (
is => 'rw',
default => sub { 1 }
);
lib/Deployer/Image/PNG.pm view on Meta::CPAN
sub optimize {
my ($self) = @_;
for (my $i = 0; $i < $self->iterations; $i++) {
$self->quantize() if $self->use_quantization;
$self->optimize_lossless() if $self->use_lossless;
}
view all matches for this distribution
view release on metacpan or search on metacpan
-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
view all matches for this distribution
view release on metacpan or search on metacpan
-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
view all matches for this distribution
view release on metacpan or search on metacpan
2.10 2014-08-23 17:55:26Z
- fix pod error (thanks haarg!)
- generated test filename is now configurable
2.09 2014-08-23 08:40:01Z
- sort the arguments to kwalitee_ok, for smaller diffs between iterations
- now again running the generated test during tests, but without
attempting to capture its output cleverly
2.08 2014-08-16 04:56:06Z
- line numbers in shipped code are now almost the same (within 3) as
view all matches for this distribution