summaryrefslogtreecommitdiff
path: root/benchmarks/simple_compile.pl
diff options
context:
space:
mode:
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