Faster-Maths

 view release on metacpan or  search on metacpan

t/95benchmark.t  view on Meta::CPAN


use v5.14;
use warnings;

use Test::More;

# This "test" never fails, but prints a benchmark comparison between two
# mathematically-identical functions, one with Faster::Maths and one without

use Time::HiRes qw( gettimeofday tv_interval );
sub measure(&)
{
   my ( $code ) = @_;
   my $start = [ gettimeofday ];
   $code->();
   return tv_interval $start;
}

my $MAXCOUNT = 1000;

my $C  = [-0.8, 0.156];



( run in 1.110 second using v1.01-cache-2.11-cpan-49f99fa48dc )