projects
/
urisagit/Sort-Maker.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
initial commit
[urisagit/Sort-Maker.git]
/
exp
/
x_bench.pl
1
#!/usr/local/bin/perl
2
3
#!/usr/local/bin/perl
4
5
use strict ;
6
use warnings ;
7
8
use Benchmark ;
9
10
my $text = 'abcdffgjhjh' ;
11
my $pad = "\0" x 10 ;
12
my $pad2 = "\0" ;
13
14
timethese( shift || -2, {
15
16
long => '$text | "\0\0\0\0\0\0\0\0\0\0"',
17
short => '$text | "\0"',
18
const => '$text | ("\0" x 10)',
19
var => '$text | $pad',
20
var_short => '$text | $pad2',
21
}
22
) ;