summaryrefslogtreecommitdiff
path: root/benchmarks/simple_compile.pl
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
commit5ac2026f7eed78958d69d051e7a8e993dcf51205 (patch)
tree298c3d2f08bdfe5689998b11892d72a897985be1 /benchmarks/simple_compile.pl
downloadMoose-tarball-5ac2026f7eed78958d69d051e7a8e993dcf51205.tar.gz
Diffstat (limited to 'benchmarks/simple_compile.pl')
-rw-r--r--benchmarks/simple_compile.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/benchmarks/simple_compile.pl b/benchmarks/simple_compile.pl
new file mode 100644
index 0000000..4b5b4a8
--- /dev/null
+++ b/benchmarks/simple_compile.pl
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Benchmark::Forking qw[cmpthese];
+
+=pod
+
+This compare the overhead of Class::MOP
+to the overhead of Moose.
+
+The goal here is to see how much more
+startup cost Moose adds to Class::MOP.
+
+NOTE:
+This benchmark may not be all that
+relevant really, but it's helpful to
+see maybe.
+
+=cut
+
+cmpthese(5_000,
+ {
+ 'w/out_moose' => sub {
+ eval 'use Class::MOP;';
+ },
+ 'w_moose' => sub {
+ eval 'use Moose;';
+ },
+ }
+);
+
+1; \ No newline at end of file