March 2002 | Perl Hardware Store | 24 |
Faster version:
{ my %cmyk;
sub cmyk { my $key = join ',' , @_; return $cmyk{$key} if exists $cmyk{$key}; $cmyk{$key} = real_cmyk(@_); }
sub real_cmyk { # as before... } }
Code in C, C++, Java, etc. will be similar
Next | Copyright © 2002 M-J. Dominus |