Help for this page

Select Code to Download


  1. or download this
                 Rate     pure stirling     memo
    pure      15037/s       --     -89%     -94%
    stirling 139183/s     826%       --     -48%
    memo     267957/s    1682%      93%       --
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
        return ( $fact[ $n ] or $fact[ $n ] = $n * factorial_memo( $n - 1 
    +) );
      }
    }