some more benchmarks
[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
11to the overhead of Moose.
12
13The goal here is to see how much more
14startup cost Moose adds to Class::MOP.
15
16NOTE:
17This benchmark may not be all that
18relevant really, but it's helpful to
19see maybe.
20
21=cut
22
23cmpthese(5_000,
24 {
25 'w/out_moose' => sub {
26 eval 'use Class::MOP;';
27 },
28 'w_moose' => sub {
29 eval 'use Moose;';
30 },
31 }
32);
33
341;