You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (January 2013) (Learn how and when to remove this message) This article needs additional citations for verification. Please help improve this article by adding citations to reliable
メモ化は以前の計算を再利用するテクニックで、再帰計算のパフォーマンス改善に使われる。クロージャの挙動を理解するためのよい教材であり、Douglas Crockford の「JavaScripts The Good Parts」を通じて広く知られるようになった。再帰計算の例としてフィボナッチ数列をメモ化したものは次のとおり。gist にあったコードに少し手を入れた。 function benchmark(callable $function, $runs) { $start = microtime(true); while(--$runs) { $function(); } $end = microtime(true); return $end - $start; } function memoize(callable $function) { $cache = []; return fun
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く