FAQ
Hi,

I've problem with Benchmark module during tests.
Tests are block after test 5.
Here output with mode debug, I remove output in new to have less
comment. I try this on perl 5.8.0, same problem.
When I look on other OS, I see that this stop before 1024, but here this
go up to 65536 before I send him a CTRL C.

ok 1 - Ensure we can create a benchmark object isa Benchmark
ok 2 - timeit CODEREF isa Benchmark
ok 3 - benchmarked code was run 5 times
ok 4 - timeit eval isa Benchmark
ok 5 - benchmarked code was run 5 times

# Burning CPU to benchmark things will take time...
timeit 1 CODE(0x10f234)
runloop 1 'sub { for (1 .. 1) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 1 'sub { for (1 .. 1) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-100.00/s (n=1)
timeit: 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-100.00/s (n=1)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-100.00/s (n=1)
timeit 2 CODE(0x10f234)
runloop 2 'sub { for (1 .. 2) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 2 'sub { for (1 .. 2) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit 4 CODE(0x10f234)
runloop 4 'sub { for (1 .. 4) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 4 'sub { for (1 .. 4) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit 8 CODE(0x10f234)
runloop 8 'sub { for (1 .. 8) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 8 'sub { for (1 .. 8) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-800.00/s (n=8)
timeit: 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-800.00/s (n=8)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs (-0.01 usr + 0.00 sys = -0.01 CPU) @
-800.00/s (n=8)
timeit 16 CODE(0x10f234)
runloop 16 'sub { for (1 .. 16) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 16 'sub { for (1 .. 16) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit 32 CODE(0x10f234)
runloop 32 'sub { for (1 .. 32) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 32 'sub { for (1 .. 32) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
1600.00/s (n=32)
timeit: 0 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
1600.00/s (n=32)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 0 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
1600.00/s (n=32)
timeit 64 CODE(0x10f234)
runloop 64 'sub { for (1 .. 64) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 64 'sub { for (1 .. 64) { local $_; package main; &$c; } }'
runloop: 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
3200.00/s (n=64)
timeit: 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
3200.00/s (n=64)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
3200.00/s (n=64)
timeit 128 CODE(0x10f234)
runloop 128 'sub { for (1 .. 128) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 128 'sub { for (1 .. 128) { local $_; package main; &$c; } }'
runloop: 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
6400.00/s (n=128)
timeit: 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
6400.00/s (n=128)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 1 wallclock secs ( 0.01 usr + 0.01 sys = 0.02 CPU) @
6400.00/s (n=128)
timeit 256 CODE(0x10f234)
runloop 256 'sub { for (1 .. 256) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 256 'sub { for (1 .. 256) { local $_; package main; &$c; } }'
runloop: 1 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-12800.00/s (n=256)
timeit: 1 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-12800.00/s (n=256)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 1 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-12800.00/s (n=256)
timeit 512 CODE(0x10f234)
runloop 512 'sub { for (1 .. 512) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 512 'sub { for (1 .. 512) { local $_; package main; &$c; } }'
runloop: 3 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit: 3 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 3 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
timeit 1024 CODE(0x10f234)
runloop 1024 'sub { for (1 .. 1024) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 1024 'sub { for (1 .. 1024) { local $_; package main; &$c; } }'
runloop: 7 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-51200.00/s (n=1024)
timeit: 7 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-51200.00/s (n=1024)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 7 wallclock secs (-0.01 usr + -0.01 sys = -0.02 CPU) @
-51200.00/s (n=1024)
timeit 2048 CODE(0x10f234)
runloop 2048 'sub { for (1 .. 2048) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 2048 'sub { for (1 .. 2048) { local $_; package main; &$c; } }'
runloop:12 wallclock secs ( 0.00 usr + -0.01 sys = -0.01 CPU) @
-204800.00/s (n=2048)
timeit: 12 wallclock secs ( 0.00 usr + -0.01 sys = -0.01 CPU) @
-204800.00/s (n=2048)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 12 wallclock secs ( 0.00 usr + -0.01 sys = -0.01 CPU) @
-204800.00/s (n=2048)
timeit 4096 CODE(0x10f234)
runloop 4096 'sub { for (1 .. 4096) { local $_; package main; &$c; } }'
runloop: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
runloop 4096 'sub { for (1 .. 4096) { local $_; package main; &$c; } }'
runloop:24 wallclock secs ( 0.09 usr + -0.02 sys = 0.07 CPU) @
58514.29/s (n=4096)
timeit: 24 wallclock secs ( 0.09 usr + -0.02 sys = 0.07 CPU) @
58514.29/s (n=4096)
- 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
= 24 wallclock secs ( 0.09 usr + -0.02 sys = 0.07 CPU) @
58514.29/s (n=4096)
timeit 8192 CODE(0x10f234)
runloop 8192 'sub { for (1 .. 8192) { local $_; package main; &$c; } }'

KILL BY CTRL-C

This is perl, v5.9.0 built for OpenBSD.i386-openbsd
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedAug 31, '02 at 10:18a
activeAug 31, '02 at 10:18a
posts1
users1
websiteperl.org

1 user in discussion

Alian: 1 post

People

Translate

site design / logo © 2018 Grokbase