From f521805bb3fb8ef3e3bd75242adc4c4e210e740c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Mon, 29 Dec 2008 13:55:47 +0100 Subject: [PATCH] Memoize small primes list This makes "benchmark.binary-search" work again in a reasonable time. --- extra/math/primes/list/list.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/math/primes/list/list.factor b/extra/math/primes/list/list.factor index 08212840c3..7467d126d0 100644 --- a/extra/math/primes/list/list.factor +++ b/extra/math/primes/list/list.factor @@ -1,4 +1,4 @@ -USING: math.primes ; +USING: math.primes memoize ; IN: math.primes.list -: primes-under-million ( -- seq ) 1000000 primes-upto ; +MEMO: primes-under-million ( -- seq ) 1000000 primes-upto ;