annotate _test/temp.pl @ 407:c6e90e02dd17 ref20150831

renamed Lib->lib
author cin
date Fri, 04 Sep 2015 19:40:23 +0300
parents f23fcb19d3c1
children ee36115f6a34
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
1 #!/usr/bin/perl
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
2 use strict;
395
212cc86e470b Code cleanup
sergey
parents: 381
diff changeset
3
407
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
4 use Time::HiRes qw(gettimeofday tv_interval);
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
5 use constant COUNT => 20000000;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
6
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
7 my $t;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
8
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
9 $t = [gettimeofday];
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
10
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
11 for ( my $i = 0 ; $i < COUNT ; $i++ ) {
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
12 my $o = [];
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
13 $o->[0] = 10;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
14 $o->[20] = 11;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
15 }
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
16
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
17 print "Arrays: ", tv_interval( $t, [gettimeofday] ), "\n";
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
18
407
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
19 $t = [gettimeofday];
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
20
395
212cc86e470b Code cleanup
sergey
parents: 381
diff changeset
21
407
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
22 for ( my $i = 0 ; $i < COUNT ; $i++ ) {
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
23 my $o = {};
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
24 $o->{a} = 10;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
25 $o->{b} = 11;
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
26 }
406
f23fcb19d3c1 implemented ServicesBag
cin
parents: 398
diff changeset
27
407
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
28 print "Hashes: ", tv_interval( $t, [gettimeofday] ), "\n";
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
29
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
30
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
31
c6e90e02dd17 renamed Lib->lib
cin
parents: 406
diff changeset
32 1;