comparison _test/temp.pl @ 395:212cc86e470b

Code cleanup DateTime locale support for HTTP requests
author sergey
date Thu, 20 Feb 2014 01:33:03 +0400
parents ced5937ff21a
children 38cb0b80e88e
comparison
equal deleted inserted replaced
394:2c14f66efa08 395:212cc86e470b
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 use strict; 2 use strict;
3 use Scalar::Util qw(looks_like_number);
4 print looks_like_number(0);
5 3
4 use Time::HiRes qw(gettimeofday tv_interval);
5
6 my $hash = {
7 x => 2.0,
8 y => 2.0,
9 z => 2.3,
10 w => 1.0
11 };
12
13 my $t = [gettimeofday];
14
15 for(my $i = 0; $i < 1000000; $i ++) {
16 $hash->{x} = $i;
17 }
18
19
20 print "HASH: ",tv_interval($t,[gettimeofday]),"\n";
21
22
23 my $array = [2,2,2.3,1.0];
24
25 $t = [gettimeofday];
26
27 for(my $i = 0; $i < 1000000; $i ++) {
28 $array->[1] = $i;
29 }
30
31 print "ARRAY: ",tv_interval($t,[gettimeofday]),"\n";