comparison _test/temp.pl @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 1f7a6d762394
children 6b1dda998839
comparison
equal deleted inserted replaced
193:8e8401c0aea4 194:4d0e1962161c
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 use strict; 2 use strict;
3 use Time::HiRes qw(gettimeofday tv_interval); 3 use Time::HiRes qw(gettimeofday tv_interval);
4 4
5 sub func { 5 sub func {
6 1; 6 1;
7 } 7 }
8 8
9 my $t0 = [gettimeofday()]; 9 my $t0 = [gettimeofday()];
10 10
11 for(my $i = 0; $i < 1000000; $i++) { 11 for(my $i = 0; $i < 1000000; $i++) {
12 func(1); 12 func(1);
13 } 13 }
14 14
15 print tv_interval($t0),"\n"; 15 print tv_interval($t0),"\n";
16 16
17 my $fn = sub { 1; }; 17 my $fn = sub { 1; };
18 18
19 $t0 = [gettimeofday()]; 19 $t0 = [gettimeofday()];
20 20
21 for(my $i = 0; $i < 1000000; $i++) { 21 for(my $i = 0; $i < 1000000; $i++) {
22 &$fn(1); 22 &$fn(1);
23 } 23 }
24 24
25 print tv_interval($t0),"\n"; 25 print tv_interval($t0),"\n";
26 26
27 sub dummy() { 0; } 27 sub dummy() { 0; }
28 28
29 $t0 = [gettimeofday()]; 29 $t0 = [gettimeofday()];
30 30
31 for(my $i = 0; $i < 1000000; $i++) { 31 for(my $i = 0; $i < 1000000; $i++) {
32 dummy; 32 dummy;
33 } 33 }
34 34
35 print tv_interval($t0),"\n"; 35 print tv_interval($t0),"\n";
36 36
37 $t0 = [gettimeofday()]; 37 $t0 = [gettimeofday()];
38 38
39 for(my $i = 0; $i < 1000000; $i++) { 39 for(my $i = 0; $i < 1000000; $i++) {
40 1; 40 1;
41 } 41 }
42 42
43 print tv_interval($t0),"\n"; 43 print tv_interval($t0),"\n";
44 44