annotate _test/temp.pl @ 184:7525ea9a071a

IMPL::Web::View::TTLoader tests
author sergey
date Thu, 29 Mar 2012 01:54:20 +0400
parents 1f7a6d762394
children 4d0e1962161c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
83
74bae30eb25e (no commit message)
wizard
parents:
diff changeset
1 #!/usr/bin/perl
93
0667064553ef fixed _is_class in activator
wizard
parents: 86
diff changeset
2 use strict;
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
3 use Time::HiRes qw(gettimeofday tv_interval);
93
0667064553ef fixed _is_class in activator
wizard
parents: 86
diff changeset
4
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
5 sub func {
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
6 1;
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
7 }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
8
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
9 my $t0 = [gettimeofday()];
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
10
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
11 for(my $i = 0; $i < 1000000; $i++) {
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
12 func(1);
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
13 }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
14
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
15 print tv_interval($t0),"\n";
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
16
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
17 my $fn = sub { 1; };
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
18
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
19 $t0 = [gettimeofday()];
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
20
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
21 for(my $i = 0; $i < 1000000; $i++) {
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
22 &$fn(1);
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
23 }
134
44977efed303 Significant performance optimizations
wizard
parents: 125
diff changeset
24
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
25 print tv_interval($t0),"\n";
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
26
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
27 sub dummy() { 0; }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
28
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
29 $t0 = [gettimeofday()];
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
30
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
31 for(my $i = 0; $i < 1000000; $i++) {
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
32 dummy;
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
33 }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
34
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
35 print tv_interval($t0),"\n";
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
36
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
37 $t0 = [gettimeofday()];
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
38
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
39 for(my $i = 0; $i < 1000000; $i++) {
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
40 1;
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
41 }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
42
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
43 print tv_interval($t0),"\n";
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
44