aboutsummaryrefslogtreecommitdiff
path: root/Code/Perl/func_slow.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Code/Perl/func_slow.pl')
-rwxr-xr-xCode/Perl/func_slow.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/Code/Perl/func_slow.pl b/Code/Perl/func_slow.pl
new file mode 100755
index 000000000000..f32d09ed9bf8
--- /dev/null
+++ b/Code/Perl/func_slow.pl
@@ -0,0 +1,20 @@
+#!./perl -w
+
+sub func_c {
+ print "Function C\n";
+ for (my $i = 0; $i < 3000000; $i++) { my $j = $i + 1; }
+}
+
+sub func_b {
+ print "Function B\n";
+ for (my $i = 0; $i < 2000000; $i++) { my $j = $i + 1 ; }
+ func_c();
+}
+
+sub func_a {
+ print "Function A\n";
+ for (my $i = 0; $i < 1000000; $i++) { my $j = $i + 1; }
+ func_b();
+}
+
+func_a();