]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove "primes-under-million" list
authorSamuel Tardieu <sam@rfc1149.net>
Wed, 7 Jan 2009 09:34:07 +0000 (10:34 +0100)
committerSamuel Tardieu <sam@rfc1149.net>
Wed, 7 Jan 2009 09:40:00 +0000 (10:40 +0100)
In the past, this was a static list used to optimize prime factors
computation. Now that the dependency has been reversed, there is
no point in keeping this list which can be obtained by
"1000000 primes-upto" as easily.

extra/benchmark/binary-search/binary-search.factor
extra/math/primes/list/authors.txt [deleted file]
extra/math/primes/list/list.factor [deleted file]

index e5c81a954d0569c5a99b785930a474c8f445e913..5883836b7dbb229055bd4ab35f841bc127e89377 100644 (file)
@@ -1,13 +1,17 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: binary-search kernel math.primes.list math.ranges sequences
-prettyprint ;
+USING: binary-search compiler.units kernel math.primes math.ranges
+memoize prettyprint sequences ;
 IN: benchmark.binary-search
 
-: binary-search-benchmark ( -- )
-    1 1000000 [a,b] [ primes-under-million sorted-member? ] map length . ;
+[
+    MEMO: primes-under-million ( -- seq ) 1000000 primes-upto ;
+] with-compilation-unit
 
 ! Force computation of the primes list before benchmarking the binary search
 primes-under-million drop
 
+: binary-search-benchmark ( -- )
+    1 1000000 [a,b] [ primes-under-million sorted-member? ] map length . ;
+
 MAIN: binary-search-benchmark
diff --git a/extra/math/primes/list/authors.txt b/extra/math/primes/list/authors.txt
deleted file mode 100644 (file)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/math/primes/list/list.factor b/extra/math/primes/list/list.factor
deleted file mode 100644 (file)
index 7467d12..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-USING: math.primes memoize ;
-IN: math.primes.list
-
-MEMO: primes-under-million ( -- seq ) 1000000 primes-upto ;