]> gitweb.factorcode.org Git - factor.git/blob - extra/benchmark/binary-search/binary-search.factor
Merge branch 'master' into experimental (untested!)
[factor.git] / extra / benchmark / binary-search / binary-search.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: binary-search math.primes.list math.ranges sequences
4 prettyprint ;
5 IN: benchmark.binary-search
6
7 : binary-search-benchmark ( -- )
8     1 1000000 [a,b] [ primes-under-million sorted-member? ] map length . ;
9
10 MAIN: binary-search-benchmark