Package : perl-Memoize > RPM : perl-Memoize-1.30.0-11.mga6.src.rpm
Basic items
Name | perl-Memoize |
Version | 1.30.0 |
Release | 11.mga6 |
URL | http://search.cpan.org/dist/Memoize |
Group | Development/Perl |
Summary | Automatically cache results of functions |
Size | 49KB |
Arch | noarch |
License | GPL+ or Artistic |
Description
`Memoizing' a function makes it faster by trading space for time. It does
this by caching the return values of the function in a table. If you call
the function again with the same arguments, 'memoize' jumps in and gives
you the value out of the table, instead of letting the function compute the
value all over again.
Here is an extreme example. Consider the Fibonacci sequence, defined by the
following function:
sub fib {
my $n = shift;
return $n if $n < 2;
fib($n-1) + fib($n-2);
}
this by caching the return values of the function in a table. If you call
the function again with the same arguments, 'memoize' jumps in and gives
you the value out of the table, instead of letting the function compute the
value all over again.
Here is an extreme example. Consider the Fibonacci sequence, defined by the
following function:
sub fib {
my $n = shift;
return $n if $n < 2;
fib($n-1) + fib($n-2);
}
Media information
Distribution release | Mageia 6 |
Media name | core-release |
Media arch | i586 |
Advanced items
Source RPM | NOT IN DATABASE ?! |
Build time | 2016-06-19 05:32:17 |
Changelog | View in Sophie |
Files | View in Sophie |
Dependencies | View in Sophie |