diff _test/temp.pl @ 167:1f7a6d762394

SQL schema in progress
author sourcer
date Thu, 12 May 2011 08:57:19 +0400
parents 7245c39e941e
children 4d0e1962161c
line wrap: on
line diff
--- a/_test/temp.pl	Sat Apr 23 23:12:06 2011 +0400
+++ b/_test/temp.pl	Thu May 12 08:57:19 2011 +0400
@@ -1,6 +1,44 @@
 #!/usr/bin/perl
 use strict;
+use Time::HiRes qw(gettimeofday tv_interval);
 
-use DateTime::TimeZone;
+sub func {
+	1;
+}
+
+my $t0 = [gettimeofday()];
+
+for(my $i = 0; $i < 1000000; $i++) {
+	func(1);
+}
+
+print tv_interval($t0),"\n";
+
+my $fn = sub { 1; };
+
+$t0 = [gettimeofday()];
+
+for(my $i = 0; $i < 1000000; $i++) {
+	&$fn(1);
+}
 
-print "$_\n" foreach DateTime::TimeZone->names_in_category('America');
\ No newline at end of file
+print tv_interval($t0),"\n";
+
+sub dummy() { 0; }
+
+$t0 = [gettimeofday()];
+
+for(my $i = 0; $i < 1000000; $i++) {
+	dummy;
+}
+
+print tv_interval($t0),"\n";
+
+$t0 = [gettimeofday()];
+
+for(my $i = 0; $i < 1000000; $i++) {
+	1;
+}
+
+print tv_interval($t0),"\n";
+