require Devel::PartialDump 0.14, to avoid infinite loop bug
[gitmo/Moose.git] / benchmarks / simple_compile.pl
CommitLineData
7623f774 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Benchmark::Forking qw[cmpthese];
7
8=pod
9
10This compare the overhead of Class::MOP
d03bd989 11to the overhead of Moose.
7623f774 12
d03bd989 13The goal here is to see how much more
7623f774 14startup cost Moose adds to Class::MOP.
15
16NOTE:
d03bd989 17This benchmark may not be all that
18relevant really, but it's helpful to
7623f774 19see maybe.
20
21=cut
22
d03bd989 23cmpthese(5_000,
7623f774 24 {
25 'w/out_moose' => sub {
26 eval 'use Class::MOP;';
27 },
28 'w_moose' => sub {
29 eval 'use Moose;';
d03bd989 30 },
7623f774 31 }
32);
33
341;