Result:
found more than 872 distributions - search limited to the first 2001 files matching your query ( run in 4.092 )


Bit-Manip-PP

 view release on metacpan or  search on metacpan

examples/xs_vs_pp.pl  view on Meta::CPAN

    Bit::Manip::PP::bit_set(65535, 0, 8, 0xFF);
}

__END__

Benchmark: timing 1000000 iterations of c, p...
         c:  3 wallclock secs ( 3.35 usr +  0.00 sys =  3.35 CPU) @ 298507.46/s (n=1000000)
         p: 17 wallclock secs (16.58 usr +  0.00 sys = 16.58 CPU) @ 60313.63/s (n=1000000)

   Rate    p    c
p  60606/s   -- -80%

 view all matches for this distribution


Bit-Manip

 view release on metacpan or  search on metacpan

examples/xs_vs_pp.pl  view on Meta::CPAN

    Bit::Manip::PP::bit_set(65535, 0, 8, 0xFF);
}

__END__

Benchmark: timing 1000000 iterations of c, p...
         c:  3 wallclock secs ( 3.35 usr +  0.00 sys =  3.35 CPU) @ 298507.46/s (n=1000000)
         p: 17 wallclock secs (16.58 usr +  0.00 sys = 16.58 CPU) @ 60313.63/s (n=1000000)
      Rate    p    c
p  60606/s   -- -80%
c 299401/s 394%   --

 view all matches for this distribution


Bit-Set

 view release on metacpan or  search on metacpan

lib/Bit/Set.pm  view on Meta::CPAN

    # Constants
    use constant BPQW => 64;    # bits per qword (8 bytes * 8 bits)
    use constant BPB  => 8;     # bits per byte


    # Test sizes and iterations
    my @size_array = (
        128,   256,   512,    1024,   2048,   4096, 8192, 16384,
        32768, 65536, 131072, 262144, 524288, 1048576
    );
    my $iterations = 1000;

    # Benchmark function registry
    my %benchmark_funcs = (
        'Count' => {
            code  => \&benchmark_bit_count,

lib/Bit/Set.pm  view on Meta::CPAN

        my $bit1 = Bit_new($size);
        Bit_set( $bit1, int( $size / 2 ), $size - 1 );
        Bit_bset( $bit1, 0 );

        my $t0         = [gettimeofday];
        my $result     = Bit_count($bit1) for 1 .. $iterations;
        my $t1         = [gettimeofday];
        my $total_time = tv_interval $t0, $t1;

        Bit_free( \$bit1 );

lib/Bit/Set.pm  view on Meta::CPAN

        my $bit2 = Bit_new($size);
        Bit_set( $bit1, int( $size / 2 ), $size - 1 );
        Bit_bset( $bit1, 0 );

        my $t0         = [gettimeofday];
        my $result     = Bit_inter_count( $bit1, $bit2 ) for 1 .. $iterations;
        my $t1         = [gettimeofday];
        my $total_time = tv_interval $t0, $t1;

        Bit_free( \$bit1 );
        Bit_free( \$bit2 );

lib/Bit/Set.pm  view on Meta::CPAN

        my $total_time = $benchmark_func->($size);

        my $total_time_ns = $total_time * 1_000_000_000;    # Convert to nanoseconds

        # Calculate derived metrics
        my $time_per_iteration    = $total_time_ns / $iterations;
        my $iterations_per_second = $iterations / $total_time;

        # Format and print results
        printf
        "%-30s (size = %8d): %12.0f ns total\t%8.2f ns/iter\t%10.2e iter/s\n",
        "Bit $test_name", $size, $total_time_ns, $time_per_iteration,
        $iterations_per_second;
    }

    # Main benchmark execution
    print "Running individual benchmarks...\n";
    print "=" x 80, "\n";

 view all matches for this distribution


Bit-Vector

 view release on metacpan or  search on metacpan

lib/Bit/Vector/String.pod  view on Meta::CPAN

concatenates into the final string using "C<join('', ...)>".

A benchmark reveals that this method is about 40 times slower
than the method "C<to_Bin()>" (which is realized in C):

 Benchmark: timing 10000 iterations of to_Bin, to_Hex, to_Oct...
     to_Bin:  1 wallclock secs ( 1.09 usr +  0.00 sys =  1.09 CPU)
     to_Hex:  1 wallclock secs ( 0.53 usr +  0.00 sys =  0.53 CPU)
     to_Oct: 40 wallclock secs (40.16 usr +  0.05 sys = 40.21 CPU)

Note that since an octal digit is always worth three bits,

lib/Bit/Vector/String.pod  view on Meta::CPAN

of a list.

A benchmark reveals that this method is about 40 times slower than
the method "C<from_Bin()>" (which is realized in C):

 Benchmark: timing 10000 iterations of from_Bin, from_Hex, from_Oct...
   from_Bin:  1 wallclock secs ( 1.13 usr +  0.00 sys =  1.13 CPU)
   from_Hex:  1 wallclock secs ( 0.80 usr +  0.00 sys =  0.80 CPU)
   from_Oct: 46 wallclock secs (44.95 usr +  0.00 sys = 44.95 CPU)

If the given string contains any character which is not an octal digit

 view all matches for this distribution


Blitz

 view release on metacpan or  search on metacpan

lib/Blitz/Validate.pm  view on Meta::CPAN

        push @$reasons, "Invalid URL: $options->{url}";
    }

    # pattern
    if ($options->{pattern} && $test_type eq 'rush') {
        if (!$options->{pattern}{iterations} || ! _is_integer($options->{pattern}{iterations}) ) {
            push @$reasons, "Pattern iterations not given or not an integer";
        }
        else {
            $options->{pattern}{iterations} += 0;
        }
        if (! $options->{pattern}{intervals} || ! _is_array($options->{pattern}{intervals}) ) {
            push @$reasons, "Intervals is not an array";
        }
    }

 view all matches for this distribution


Boost-Geometry-Utils

 view release on metacpan or  search on metacpan

src/boost/graph/named_function_params.hpp  view on Meta::CPAN

  struct attractive_force_t { };
  struct repulsive_force_t { };
  struct force_pairs_t { };
  struct cooling_t { };
  struct vertex_displacement_t { };
  struct iterations_t { };
  struct diameter_range_t { };
  struct learning_constant_range_t { };
  struct vertices_equivalent_t { };
  struct edges_equivalent_t { };
  struct index_in_heap_map_t { };

src/boost/graph/named_function_params.hpp  view on Meta::CPAN

    BOOST_BGL_ONE_PARAM_CREF(displacement_map, vertex_displacement) \
    BOOST_BGL_ONE_PARAM_CREF(attractive_force, attractive_force) \
    BOOST_BGL_ONE_PARAM_CREF(repulsive_force, repulsive_force) \
    BOOST_BGL_ONE_PARAM_CREF(force_pairs, force_pairs) \
    BOOST_BGL_ONE_PARAM_CREF(cooling, cooling) \
    BOOST_BGL_ONE_PARAM_CREF(iterations, iterations) \
    BOOST_BGL_ONE_PARAM_CREF(diameter_range, diameter_range) \
    BOOST_BGL_ONE_PARAM_CREF(learning_constant_range, learning_constant_range) \
    BOOST_BGL_ONE_PARAM_CREF(vertices_equivalent, vertices_equivalent) \
    BOOST_BGL_ONE_PARAM_CREF(edges_equivalent, edges_equivalent) \
    BOOST_BGL_ONE_PARAM_CREF(index_in_heap_map, index_in_heap_map) \

 view all matches for this distribution


Boost-Graph

 view release on metacpan or  search on metacpan

include/boost/graph/fruchterman_reingold.hpp  view on Meta::CPAN


template<typename T>
struct linear_cooling {
  typedef T result_type;

  linear_cooling(std::size_t iterations)
    : temp(T(iterations) / T(10)), step(0.1) { }

  linear_cooling(std::size_t iterations, T temp)
    : temp(temp), step(temp / T(iterations)) { }

  T operator()()
  {
    T old_temp = temp;
    temp -= step;

 view all matches for this distribution


Bot-Telegram

 view release on metacpan or  search on metacpan

t/01-polling.t  view on Meta::CPAN

  eval { $bot -> start_polling({ timeout => 30, allowed_updates => ['message'] }, restart => 1) };
  ok !$@, 'named options';
};


# Multiple iterations (make sure the next _poll actually gets scheduled)

my $counter = 0;

$bot -> stop_polling;
$bot -> api(bot_api

 view all matches for this distribution


Boulder

 view release on metacpan or  search on metacpan

Boulder/Store.pm  view on Meta::CPAN

	'index'=>undef,		# filled in by _open_databases
	'writable'=>$writable,
	'basename'=>$in,
	'passthru'=>undef,
	'binary'=>'true',
	'nextrecord'=>0,	# next record to retrieve during iterations
	'query_records'=>undef,	# list of records during optimized queries
	'query_test'=>undef,	# an expression to apply to each record during a query
	'IN'=>undef,
	'OUT'=>undef,
	'delim'=>'=',

 view all matches for this distribution


Box2D

 view release on metacpan or  search on metacpan

examples/breakable.pl  view on Meta::CPAN


# frames per second
my $fps      = 60.0;
my $timestep = 1.0 / $fps;

# velocity iterations
my $vIters = 10;

# position iterations
my $pIters = 10;

my $gravity = Box2D::b2Vec2->new( 0, 9.8 );
my $world = Box2D::b2World->new( $gravity, 1 );

 view all matches for this distribution


Brackup

 view release on metacpan or  search on metacpan

lib/Brackup/Target/Filesystem.pm  view on Meta::CPAN

        }
    }

    # for each 4-digit directory, sorted by number of four-digit directories
    # that exist for their leading 2-digit prefix (to most quickly free up
    # a link in root, in 2 iterations),
    # see if the "01/" directory exists (the leading two bytes).
    # if not,
    #    move it to some random other 'xxxx' directory,
    #    as, say, "abcd/tmp-was-root-0123".
    # now, for either the "0123" directory or "tmp-was-root-0123"

 view all matches for this distribution


Brick

 view release on metacpan or  search on metacpan

t/general/__fields_are_something.t  view on Meta::CPAN


	do { print STDERR "\tpassed\n\n" if $ENV{DEBUG}; next } if $entry->[2];

	my @data = ( $entry->[3] );
	my @errors = ();
	my $iterations = 0;
	while( my $error = shift @data )
		{
		last if $iterations++ > 20; # debugging guard against infinity
#		print STDERR "Iteration $iterations\n";
		if( $error->{handler} =~ m/^__/ )
			{
			push @data, @{ $error->{errors} };
			next;
			}

 view all matches for this distribution


BsDiPa

 view release on metacpan or  search on metacpan

c-lib/README  view on Meta::CPAN


v0.6.1, 2025-02-17:
  - Coverity.com (project 31371 / s-bsdipa) FIXes for the s-bsdipa
    example program: one unused value, one fd resource leak.
    (Tool design changed without that being adopted in early design
    stage: obviously not enough iterations and/or too much fuzz.)
  - bsdipa_patch() CHANGE: until now field lengths were not verified
    in the (unusual) .pc_patch_dat==NULL case, as the user was expected
    to have done this before; instead, always check anything.
  -- Do not increment minor number nonetheless, no ABI change.

 view all matches for this distribution


Business-MaxMind

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

--blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-b
-bar
-boc
-ci=4

 view all matches for this distribution


Business-PayPal-API

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

--blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-b
-bar
-boc
-ci=4

 view all matches for this distribution


C-Blocks

 view release on metacpan or  search on metacpan

bench/c-blocks-vs-inline.pl  view on Meta::CPAN

	return $to_return;
}

use Time::HiRes qw(gettimeofday tv_interval);

my $N_iterations = 1000;
for my $log_N (1, 1.5, 2, 2.5, 3, 3.5, 4) {
	my $N = int(10**$log_N);
	print "--- N = $N ---\n";
	
	# C::Blocks test
	my $C_Blocks_accum = 0;
	my $C_Blocks_result;
	for (1 .. $N_iterations) {
		my $t0 = [gettimeofday];
		cblock { sv_setiv($C_Blocks_result, get_Nth_prime(SvIV($N))); }
		my $ellapsed = tv_interval ($t0);
		$C_Blocks_accum += $ellapsed;
	}
	my $C_Blocks_time = $C_Blocks_accum / $N_iterations;
	
	# C::Blocks sub test
	my $C_Blocks_sub_accum = 0;
	my $C_Blocks_sub_result;
	for (1 .. $N_iterations) {
		my $t0 = [gettimeofday];
		$C_Blocks_sub_result = c_blocks_sub_Nth_prime($N);
		my $ellapsed = tv_interval ($t0);
		$C_Blocks_sub_accum += $ellapsed;
	}
	my $C_Blocks_sub_time = $C_Blocks_sub_accum / $N_iterations;
	
	# Inline::C test
	my $Inline_C_accum = 0;
	my $Inline_C_result;
	for (1 .. $N_iterations) {
		my $t0 = [gettimeofday];
		$Inline_C_result = get_Nth_prime($N);
		my $ellapsed = tv_interval ($t0);
		$Inline_C_accum += $ellapsed;
	}
	my $Inline_C_time = $Inline_C_accum / $N_iterations;
	
	print "C::Blocks/sub took $C_Blocks_sub_accum seconds, $C_Blocks_sub_time on average\n";
	print "C::Blocks took $C_Blocks_accum seconds, $C_Blocks_time on average\n";
	print "Inline::C took $Inline_C_accum seconds, $Inline_C_time on average\n";
	print "C::Blocks gave $C_Blocks_result; C::Blocks/sub gave $C_Blocks_sub_result; Inline::C gave $Inline_C_result\n";

 view all matches for this distribution


CAM-Template

 view release on metacpan or  search on metacpan

t/template.t  view on Meta::CPAN

   $t->setFileCache(1);
   $t->setFilename($0);
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter iterations with filecache\n";

$t->setFileCache(0);
$start = getTime();
for (my $i=0; $i<$niter; $i++)
{

t/template.t  view on Meta::CPAN

   $t->setFileCache(0);
   $t->setFilename($0);
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter iterations without filecache\n";

print "## Tests of just replace\n";
print "## 'hard' means a template with lots of syntax to search and replace\n";
print "## 'easy' means a template of just content, nothing to replace\n";

t/template.t  view on Meta::CPAN

for (my $i=0; $i<$niter; $i++)
{
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter hard iterations with study\n";

$t->setFilename($0);
$start = getTime();
for (my $i=0; $i<$niter; $i++)
{
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter hard iterations without study\n";

my $simple = " " x length($t->{content}->{string});
$t->setString($simple);
$t->study();
$start = getTime();
for (my $i=0; $i<$niter; $i++)
{
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter easy iterations with study\n";

$t->setString($simple);
$start = getTime();
for (my $i=0; $i<$niter; $i++)
{
   $out = $t->toString();
}
$stop = getTime();
print "# Performance test: ".sprintf("%.2f",$stop-$start)." seconds for $niter easy iterations without study\n";

# TODO:
# test resetting the params hash
# test print method
# test setFileCache method better

 view all matches for this distribution


CCCP-HTML-Truncate

 view release on metacpan or  search on metacpan

lib/CCCP/HTML/Truncate.pm  view on Meta::CPAN

Charset for source html.
Default 'utf-8'.

=head1 BENCHMARK

	Benchmark: timing 10000 iterations of CCCP::HTML::Truncate, HTML::Truncate...
	CCCP::HTML::Truncate:  4 wallclock secs ( 4.55 usr +  0.00 sys =  4.55 CPU) @ 2197.80/s (n=10000)
	HTML::Truncate:        5 wallclock secs ( 4.86 usr +  0.00 sys =  4.86 CPU) @ 2057.61/s (n=10000)
	
	Benchmark: timing 25000 iterations of CCCP::HTML::Truncate, HTML::Truncate...
	CCCP::HTML::Truncate: 12 wallclock secs (11.37 usr +  0.00 sys = 11.37 CPU) @ 2198.77/s (n=25000)
	HTML::Truncate:       12 wallclock secs (12.12 usr +  0.01 sys = 12.13 CPU) @ 2061.01/s (n=25000)


=head1 WARNING

 view all matches for this distribution


CDB_File

 view release on metacpan or  search on metacpan

CDB_File.xs  view on Meta::CPAN

/*

Most of this is reasonably straightforward.  The complications arise
when we are "iterating" over the CDB file, that is to say, using `keys'
or `values' or `each' to retrieve all the data in the file in order.
This interface stores extra data to allow us to track iterations: end
is a pointer to the end of data in the CDB file, and also a flag which
indicates whether we are iterating or not (note that the end of data
occurs at a position >= 2048); curkey is a copy of the current key;
curpos is the file offset of curkey; and fetch_advance is 0 for

 view all matches for this distribution


CDDB

 view release on metacpan or  search on metacpan

HISTORY  view on Meta::CPAN

*** 1.00 1999.07.16

Whenever someone updates a CDDB record that cddb.t tests against, it
breaks the test.  It's a fairly harmless problem, but it does cause
CDDB not to pass its tests.  I'm fed up with it after a few
iterations, so I changed the hard "retrieved track offset != stored
one" tests with a more lenient "retrieved track offset within 5% of
stored one".

While I'm at it, make the title tests approximate by normalizing
whitespace and only comparing consonants.  Sort of an approximate

 view all matches for this distribution


CGI-ACL

 view release on metacpan or  search on metacpan

t/integration.t  view on Meta::CPAN

# without a new network round-trip.
#
# local $_ protects the caller's loop variable: CGI::Lingua and the WHOIS
# modules it calls use $_ internally (e.g. in grep/map inside
# Net::Whois::IANA), and without localisation that clobbers map/grep
# iterations in the calling code, producing scrambled results.
my %_lingua_cache;
sub lingua_for {
	my $addr = shift;
	unless(exists $_lingua_cache{$addr}) {
		local $_;

 view all matches for this distribution


CGI-Application-Plugin-Output-XSV

 view release on metacpan or  search on metacpan

XSV.pm  view on Meta::CPAN

      }
    }
  }
  # using iterator
  else {
    my $iterations = 0;

    while ( my $list_ref = $opts{iterator}->($fields) ) {
      croak "return value from iterator is not an array reference, aborting"
        if ref( $list_ref ) ne 'ARRAY';

      # XXX infinite loop?
      croak "iterator exceeded maximum iterations ($opts{maximum_iters})"
        if ++$iterations > $opts{maximum_iters};

      $output .= add_to_xsv(
        $csv, $row_filter->($list_ref, $fields), $opts{line_ending}
      );

 view all matches for this distribution


CGI-Compile

 view release on metacpan or  search on metacpan

t/race-conditions.t  view on Meta::CPAN


        ok($? >> 8 == 0, "no race condition in child PID=$child");
    }
};

# 400 iterations when smoking, 25 otherwise.
for (1..($ENV{AUTOMATED_TESTING} ? 400 : 25)) {
    my $errors = capture_stderr {
        # Use 8 simultaneous processes when smoking, 2 otherwise.
        for (1..($ENV{AUTOMATED_TESTING} ? 8 : 2)) {
            defined(my $child = fork()) or die "fork() failed: $!";

 view all matches for this distribution


CGI-Ex

 view release on metacpan or  search on metacpan

samples/benchmark/bench_cgix_hfif.pl  view on Meta::CPAN

#!/usr/bin/perl -w

# Benchmark: timing 1000 iterations of cgix_func, cgix_meth, hfif...
#  cgix_func:  1 wallclock secs ( 1.41 usr +  0.01 sys =  1.42 CPU) @ 704.23/s (n=1000)
#  cgix_meth:  2 wallclock secs ( 1.47 usr +  0.00 sys =  1.47 CPU) @ 680.27/s (n=1000)
#  hfif:  8 wallclock secs ( 8.34 usr +  0.04 sys =  8.38 CPU) @ 119.33/s (n=1000)
#            Rate      hfif cgix_meth cgix_func
# hfif      119/s        --      -82%      -83%

 view all matches for this distribution


CGI-Info

 view release on metacpan or  search on metacpan

lib/CGI/Info.pm  view on Meta::CPAN

}

# Robust filename generation (preventing overwriting).
# Previously used "! -e $rc" which checked existence in the CURRENT WORKING
# DIRECTORY, not the upload directory — a logic bug and a TOCTOU race.
# Now checks in the actual upload directory and caps iterations to avoid
# an infinite loop if the directory fills up.
sub _create_file_name :Protected {
	my ($self, $args) = @_;

	my $upload_dir = $self->{upload_dir};

 view all matches for this distribution


CPAN-Checksums

 view release on metacpan or  search on metacpan

lib/CPAN/Checksums.pm  view on Meta::CPAN


By setting the global variable $TRY_SHORTNAME to a true value, you can
tell updatedir() to include an attribute C<shortname> in the resulting
hash that is 8.3-compatible. Please note, that updatedir() in this
case may be slow and may even fail on large directories, because it
will always only try 1000 iterations to find a name that is not yet
taken and then give up.

=item $SIGNING_KEY

Setting the global variable $SIGNING_KEY makes the generated C<CHECKSUMS>

 view all matches for this distribution


CPAN-Meta

 view release on metacpan or  search on metacpan

lib/CPAN/Meta/History.pm  view on Meta::CPAN


version 2.150013

=head1 DESCRIPTION

The CPAN Meta Spec has gone through several iterations.  It was
originally written in HTML and later revised into POD (though published
in HTML generated from the POD).  Fields were added, removed or changed,
sometimes by design and sometimes to reflect real-world usage after the
fact.

 view all matches for this distribution


CPAN-MetaCurator

 view release on metacpan or  search on metacpan

data/tiddlers.json  view on Meta::CPAN

        "title": "UsernamePassword",
        "modified": "20260717064432994"
    },
    {
        "created": "20190806211249203",
        "text": "\"\"\"\no See also:\n- DataTraversal - For notes on UTF-8\n- EmailStuff - For Encode::MIME::Header\n- FileHandling - For Path::Class, Path::Tiny\n- IoLayers - For PerlIO::utf8_strict etc\n- TextProcessing\n- TheCharacterGuide\n- http...
        "title": "UTF8",
        "modified": "20260717011530525"
    },
    {
        "text": "\"\"\"\no See also:\n- AiEngines - For App::Raider\n- WebServices - For WWW::YaCyBlacklist\n- http://opensearch.org/\n\no App::PerlGlue:\n- Glue messy text into useful shapes\n- https://metacpan.org/dist/App-PerlGlue\n\no App::plockf...

 view all matches for this distribution


CPAN

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


	* release 1.92_56: unstable release both bugfixes and new features

	* addressing #32841: fixing wrong usage of HOME vs File::HomeDir spotted
	by Randy Kobes based on a bugreport by David Wheeler; with help from
	Schwern and Adam Kennedy and I'm sure this will need more iterations.

	* added 'trust_test_report_history' config option; when set, CPAN will
	skip tests for a distribution and rely on test report results if a prior
	test report is found; requires CPAN::Reporter 1.07_02

 view all matches for this distribution


CPANPLUS

 view release on metacpan or  search on metacpan

bin/cpanp-boxed  view on Meta::CPAN

    use vars qw[@RUN_TIME_INC $LIB_DIR $BUNDLE_DIR $BASE $PRIV_LIB];
    $LIB_DIR        = File::Spec->catdir( $FindBin::Bin, qw[.. lib] );
    $BUNDLE_DIR     = File::Spec->catdir( $FindBin::Bin, qw[.. inc bundle] );

    ### must set the PERL5LIB env var here as well, as some
    ### code in CPANPLUS resets it between iterations. So we
    ### have to set our 'final' perl5lib before loading any
    ### CPANPLUS code. The constants code is 'safe' but better
    ### safe than sorry. So duplicating the 'constants' behaviour
    ### of DOT_CPANPLUS
    # use CPANPLUS::Internals::Constants;

 view all matches for this distribution


( run in 4.092 seconds using v1.01-cache-2.11-cpan-f03e8824b8d )