Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/thread-self/root/usr/share/doc/perl-Moose/benchmarks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/share/doc/perl-Moose/benchmarks/simple_compile.pl
#!/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;

Hry