å ¥åã«å¯¾ãã¦æ±ºã¾ã£ãå¤ãè¿ããå ¥åå¤ã®ã¬ã³ã¸ãåºããä½åº¦ãå¤ãåå¾ããå¿ è¦ãããå ´åãCãªããã§ã¯åæåæã«å ¨å ¥åå¤ã«å¯¾ããçµæãä¿æãããã¼ãã«ãçæããããã¾ããé度éè¦ããå ´åã®sinãã¼ãã«ã¨ããå²ã¨å¶ç´ãã·ãã¢ã§ãªãç°å¢ã§ã¯ãæ°ããå ¥åãã©ã¡ã¿ãä¸ãããããã³ã«å¤ãä¿åããé¢æ°ã§ãããã¨æãã¾ãã my %cache; sub fast_sin { return $cache{ $_[0] } if exists $cache{ $_[0] }; $cache{ $_[0] } = sin( $_[0] ); }Perlã®Memoizeã¢ã¸ã¥ã¼ã«ããJSANã®Memoizeã¢ã¸ã¥ã¼ã«ã使ãã¨ãã®ãã£ãã·ã³ã°æ©è½ãæ¯åæ¸ãå¿ è¦ããªããªãã¾ããPerlã®å ´åã¯ã use Memoize; memoize 'sin';ã¨ããã ãã§siné¢æ°ã«ãã£ãã·ã¥æ©æ§ãçµè¾¼ã¾ãã¾ãã Perlã§ã®
{{#tags}}- {{label}}
{{/tags}}