factor: in: -> IN:

vocab-roots get [ vocabs-from reject-some-paths ] map concat
{
    "specialized-arrays" "specialized-vectors"
    "math.blas.matrices" "math.blas.vectors" "math.vectors.simd"
    "math.vectors.simd.cords" "game.debug" "gpu.util" "gpu.effects.blur"
    "gpu.effects.step" "model-viewer" "terrain.shaders" "spheres"
    "bunny.cel-shaded" "bunny.outlined"
} diff
[ modern-source-path ] map
[ dup { [ lowercase-colon-literal? ] [ tag>> "in" sequence= ] } 1&& [ [ drop "IN" ] change-tag ] when ] rewrite-paths
locals-and-roots
Doug Coleman 2016-06-20 16:43:46 -07:00
parent 9b79fc6788
commit 263b8b9507
2414 changed files with 2417 additions and 2417 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: combinators combinators.smart io kernel math math.parser
math.ranges sequences ascii ;
in: 99-bottles
IN: 99-bottles
: bottles ( n -- number string )
[ dup 0 > [ number>string ] [ drop "No more" ] if ]

View File

@ -6,7 +6,7 @@ colors.constants colors.hex combinators concurrency.combinators
formatting fry hashtables http.client io io.styles json.reader
kernel make math math.parser sequences ui urls vocabs ;
in: hacker-news
IN: hacker-news
PRIVATE<

View File

@ -3,7 +3,7 @@
USING: accessors timers bit-arrays calendar game.input io
io.binary io.encodings.binary io.files kernel literals math
namespaces system threads ;
in: key-logger
IN: key-logger
CONSTANT: frequency $[ 1/30 seconds ] ;

View File

@ -1,5 +1,5 @@
USING: kernel io io.files io.pathnames io.monitors io.encodings.utf8 ;
in: log-viewer
IN: log-viewer
: read-lines ( stream -- )
dup stream-readln dup

View File

@ -6,7 +6,7 @@ colors.constants colors.hex combinators formatting fry
http.client io io.styles json json.reader kernel make math
math.statistics sequences urls ;
in: reddit
IN: reddit
PRIVATE<

View File

@ -3,7 +3,7 @@
USING: arrays io.launcher kernel present system webbrowser ;
in: webbrowser.linux
IN: webbrowser.linux
M: linux open-file ( path -- )
present "xdg-open" swap 2array run-detached drop ;

View File

@ -3,7 +3,7 @@
USING: arrays io.launcher kernel present system webbrowser ;
in: webbrowser.macosx
IN: webbrowser.macosx
M: macosx open-file ( path -- )
present "open" swap 2array run-detached drop ;

View File

@ -4,7 +4,7 @@
USING: accessors combinators.short-circuit io.pathnames
sequences strings system ui.operations urls vocabs ;
in: webbrowser
IN: webbrowser
HOOK: open-file os ( path -- ) ;

View File

@ -4,7 +4,7 @@
USING: kernel present system webbrowser windows.shell32
windows.user32 ;
in: webbrowser.windows
IN: webbrowser.windows
M: windows open-file ( path -- )
[ f "open" ] dip present f f

View File

@ -1,6 +1,6 @@
USING: kernel locals math math.matrices math.order math.vectors
prettyprint sequences ;
in: benchmark.3d-matrix-scalar
IN: benchmark.3d-matrix-scalar
:: p-matrix ( dim fov near far -- matrix )
dim dup first2 min v/n fov v*n near v*n

View File

@ -1,7 +1,7 @@
USING: kernel locals math math.matrices.simd math.order math.vectors
math.vectors.simd prettyprint sequences typed ;
QUALIFIED-WITH: alien.c-types c ;
in: benchmark.3d-matrix-vector
IN: benchmark.3d-matrix-vector
: v2min ( xy -- xx )
dup { 1 0 2 3 } vshuffle vmin ; inline

View File

@ -4,7 +4,7 @@
USING: accessors combinators fry hash-sets hashtables kernel
locals math math.parser sequences sets vectors ;
in: benchmark.ant
IN: benchmark.ant
! There is an ant which can walk around on a planar grid. The ant
! can move one space at a time left, right, up or down. That is,

View File

@ -3,7 +3,7 @@
USING: backtrack shuffle math math.ranges quotations locals fry
kernel words io memoize macros prettyprint sequences assocs
combinators namespaces ;
in: benchmark.backtrack
IN: benchmark.backtrack
! This was suggested by Dr_Ford. Compute the number of quadruples
! (a,b,c,d) with 1 <= a,b,c,d <= 10 such that we can make 24 by

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math sequences kernel base64 ;
in: benchmark.base64
IN: benchmark.base64
: base64-benchmark ( -- )
65535 iota [ 255 bitand ] "" map-as

View File

@ -3,7 +3,7 @@
USING: arrays assocs continuations debugger formatting fry help.markup
io io.styles kernel math memory prettyprint sequences
tools.profiler.sampling tools.test tools.time vocabs.hierarchy vocabs.loader ;
in: benchmark
IN: benchmark
: run-timing-benchmark ( vocab -- time )
5 swap '[ gc [ _ run ] benchmark ] replicate infimum ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math.ranges math.parser sets sequences ;
in: benchmark.beust1
IN: benchmark.beust1
: count-numbers ( max -- n )
1 [a,b] [ number>string all-unique? ] count ; inline

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel locals math math.ranges math.parser sequences ;
in: benchmark.beust2
IN: benchmark.beust2
! http://crazybob.org/BeustSequence.java.html

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: binary-search kernel math.primes math.ranges memoize
prettyprint sequences ;
in: benchmark.binary-search
IN: benchmark.binary-search
MEMO: primes-under-million ( -- seq ) 1000000 primes-upto ;

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel math math.ranges math.order math.parser
io locals sequences ;
in: benchmark.binary-trees
IN: benchmark.binary-trees
TUPLE: tree-node item left right ;

View File

@ -1,6 +1,6 @@
USING: bloom-filters kernel math sequences ;
in: benchmark.bloom-filters
IN: benchmark.bloom-filters
: insert-data ( bloom-filter -- bloom-filter )
100 [ 2,000 iota [ over bloom-filter-insert ] each ] times ;

View File

@ -1,4 +1,4 @@
USING: bootstrap.image ;
in: benchmark.bootstrap1
IN: benchmark.bootstrap1
main: make-images

View File

@ -1,6 +1,6 @@
USING: kernel math ;
in: benchmark.busy-loop
IN: benchmark.busy-loop
: busy-loop ( x -- n )
1,000 [

View File

@ -3,7 +3,7 @@
USING: accessors arrays assocs combinators
concurrency.mailboxes fry io kernel make math math.parser
math.text.english sequences threads ;
in: benchmark.chameneos-redux
IN: benchmark.chameneos-redux
SYMBOLS: red yellow blue ;

View File

@ -4,7 +4,7 @@
USING: combinators kernel math math.combinatorics math.ranges
sequences ;
in: benchmark.combinatorics
IN: benchmark.combinatorics
: bench-combinations ( n -- )
[1,b] dup clone [

View File

@ -1,7 +1,7 @@
USING: kernel sequences tools.completion ;
in: benchmark.completion
IN: benchmark.completion
: completion-benchmark ( -- )
"nth" 25,000 [

View File

@ -1,5 +1,5 @@
USING: math kernel continuations ;
in: benchmark.continuations
IN: benchmark.continuations
: continuations-benchmark ( -- )
1,000,000 [ drop [ continue ] callcc0 ] each-integer ;

View File

@ -1,5 +1,5 @@
USING: checksums checksums.crc32 io.encodings.ascii io.files kernel math ;
in: benchmark.crc32
IN: benchmark.crc32
: crc32-benchmark ( -- )
1,000 [

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: arrays csv kernel math.parser sequences ;
in: benchmark.csv
IN: benchmark.csv
: csv-benchmark ( -- )
1,000 200 iota [ number>string ] map <array>

View File

@ -1,7 +1,7 @@
USING: alien.c-types sequences kernel math specialized-arrays
fry ;
specialized-array: int
in: benchmark.dawes
IN: benchmark.dawes
! Phil Dawes's performance problem

View File

@ -1,5 +1,5 @@
USING: classes classes.tuple kernel sequences vocabs math ;
in: benchmark.dispatch1
IN: benchmark.dispatch1
GENERIC: g ( obj -- obj ) ;

View File

@ -1,7 +1,7 @@
USING: alien.c-types make math sequences splitting grouping
kernel columns specialized-arrays bit-arrays ;
specialized-array: double
in: benchmark.dispatch2
IN: benchmark.dispatch2
: sequences ( -- seq )
[

View File

@ -2,7 +2,7 @@ USING: alien.c-types sequences math mirrors splitting grouping
kernel make assocs alien.syntax columns
specialized-arrays bit-arrays ;
specialized-array: double
in: benchmark.dispatch3
IN: benchmark.dispatch3
GENERIC: g ( obj -- str ) ;

View File

@ -1,6 +1,6 @@
USING: kernel.private kernel sequences math combinators
sequences.private ;
in: benchmark.dispatch4
IN: benchmark.dispatch4
: dispatch4 ( n -- val )
dup {

View File

@ -1,5 +1,5 @@
USING: classes classes.tuple kernel sequences vocabs math ;
in: benchmark.dispatch5
IN: benchmark.dispatch5
mixin: g

View File

@ -1,6 +1,6 @@
USING: kernel.private kernel sequences math combinators
sequences.private ;
in: benchmark.dispatch6
IN: benchmark.dispatch6
: dispatch6 ( n -- val )
{

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: deques dlists kernel math sequences ;
in: benchmark.dlists
IN: benchmark.dlists
: dlists-benchmark ( -- )
5,000 iota [

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: decimals kernel locals math math.combinatorics math.ranges
sequences ;
in: benchmark.e-decimals
IN: benchmark.e-decimals
: D-factorial ( n -- D! )
iota decimal: 1 [ 0 <decimal> decimal: 1 D+ D* ] reduce ; inline

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.combinatorics math.ranges sequences ;
in: benchmark.e-ratios
IN: benchmark.e-ratios
: calculate-e-ratios ( n -- e )
iota [ factorial recip ] map-sum ;

View File

@ -1,5 +1,5 @@
USING: math math.private kernel sequences ;
in: benchmark.empty-loop-0
IN: benchmark.empty-loop-0
: empty-loop-0 ( n -- )
dup 0 fixnum< [ drop ] [ 1 fixnum-fast empty-loop-0 ] if ;

View File

@ -1,5 +1,5 @@
USING: math math.private kernel sequences ;
in: benchmark.empty-loop-1
IN: benchmark.empty-loop-1
: empty-loop-1 ( n -- )
[ drop ] each-integer ;

View File

@ -1,5 +1,5 @@
USING: math math.private kernel sequences ;
in: benchmark.empty-loop-2
IN: benchmark.empty-loop-2
: empty-loop-2 ( n -- )
iota [ drop ] each ;

View File

@ -1,4 +1,4 @@
in: benchmark.euler150
IN: benchmark.euler150
USING: kernel project-euler.150 ;
: euler150-benchmark ( -- )

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel fry math math.combinatorics math.order sequences
io prettyprint ;
in: benchmark.fannkuch
IN: benchmark.fannkuch
: count ( quot: ( -- ? ) -- n )
! Call quot until it returns false, return number of times

View File

@ -4,7 +4,7 @@ io.encodings.ascii io.files locals kernel math sequences
sequences.private specialized-arrays strings typed alien.data ;
QUALIFIED-WITH: alien.c-types c ;
specialized-array: c:double
in: benchmark.fasta
IN: benchmark.fasta
CONSTANT: IM 139968 ;
CONSTANT: IA 3877 ;

View File

@ -1,5 +1,5 @@
USING: math.private kernel debugger ;
in: benchmark.fib1
IN: benchmark.fib1
: fast-fixnum-fib ( m -- n )
dup 1 fixnum<= [

View File

@ -1,5 +1,5 @@
USING: math.private kernel debugger ;
in: benchmark.fib2
IN: benchmark.fib2
: fixnum-fib ( m -- n )
dup 1 fixnum<= [

View File

@ -1,5 +1,5 @@
USING: math kernel debugger ;
in: benchmark.fib3
IN: benchmark.fib3
: fib ( m -- n )
dup 1 <= [ drop 1 ] [ dup 1 - fib swap 2 - fib + ] if ;

View File

@ -1,5 +1,5 @@
USING: accessors math kernel debugger ;
in: benchmark.fib4
IN: benchmark.fib4
TUPLE: box { i read-only } ;

View File

@ -1,5 +1,5 @@
USING: math kernel debugger namespaces ;
in: benchmark.fib5
IN: benchmark.fib5
symbol: n
: namespace-fib ( m -- n )

View File

@ -1,5 +1,5 @@
USING: math kernel alien alien.c-types ;
in: benchmark.fib6
IN: benchmark.fib6
: fib ( x -- y )
int { int } cdecl [

View File

@ -1,5 +1,5 @@
USING: kernel locals math math.parser sequences ;
in: benchmark.fib7
IN: benchmark.fib7
:: matrix-fib ( m -- n )
m 0 >= [ m throw ] unless

View File

@ -1,5 +1,5 @@
USING: combinators kernel math memoize ;
in: benchmark.fib8
IN: benchmark.fib8
MEMO: (faster-fib) ( m -- n )
dup 1 > [

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: kernel locals math ;
in: benchmark.find-pi
IN: benchmark.find-pi
:: find-pi-to ( accuracy -- n approx )
1 4 [

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math sequences ;
in: benchmark.flip
IN: benchmark.flip
CONSTANT: my-generic { { 1 2 3 } V{ 4 5 6 } "ABC" } ;
CONSTANT: my-array { { 1 2 3 } { 4 5 6 } { 7 8 9 } } ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel math ;
in: benchmark.gc0
IN: benchmark.gc0
: allocate ( -- obj ) 10 f <array> ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math sequences kernel ;
in: benchmark.gc1
IN: benchmark.gc1
: gc1-benchmark ( -- ) 600000 iota [ >bignum 1 + ] map drop ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays byte-arrays kernel namespaces sequences math memory ;
in: benchmark.gc2
IN: benchmark.gc2
! Runs slowly if clean cards are not unmarked.
symbol: oldies

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math.parser fry sequences kernel assocs hashtables ;
in: benchmark.gc3
IN: benchmark.gc3
: gc3-benchmark ( -- )
1000000 iota

View File

@ -2,7 +2,7 @@
USING: combinators fry hash-sets kernel literals
math math.combinatorics sequences sets ;
in: benchmark.hash-sets
IN: benchmark.hash-sets
CONSTANT: test-sets $[
{ 10 100 1,000 10,000 50,000 100,000 }

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs combinators grouping kernel locals math
math.parser math.ranges memoize sequences ;
in: benchmark.hashtables
IN: benchmark.hashtables
MEMO: strings ( -- str )
0 100 [a,b) 1 [ + ] accumulate* [ number>string ] map ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: heaps math sequences kernel ;
in: benchmark.heaps
IN: benchmark.heaps
: data ( -- seq )
1 6000 [ 13 + 79 * 13591 mod dup ] replicate nip ;

View File

@ -4,7 +4,7 @@
USING: fry grouping interval-sets kernel math random sequences
sorting ;
in: benchmark.interval-sets
IN: benchmark.interval-sets
: interval-sets-benchmark ( -- )
10,000 [ random-32 ] replicate natural-sort

View File

@ -1,4 +1,4 @@
in: benchmark.iteration
IN: benchmark.iteration
USING: sequences vectors arrays strings sbufs math math.vectors
kernel ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: io.encodings.utf8 io.files kernel peg.javascript ;
in: benchmark.javascript
IN: benchmark.javascript
: javascript-benchmark ( -- )
"vocab:benchmark/javascript/jquery-1.3.2.min.js"

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: assocs json.reader json.writer kernel math math.parser
sequences ;
in: benchmark.json
IN: benchmark.json
: json-benchmark ( -- )
200 iota [ [ number>string ] keep ] H{ } map>assoc

View File

@ -4,7 +4,7 @@ USING: ascii kernel io io.files splitting strings
io.encodings.ascii hashtables sequences assocs math
math.statistics namespaces math.parser combinators arrays
sorting formatting grouping fry ;
in: benchmark.knucleotide
IN: benchmark.knucleotide
CONSTANT: knucleotide-in "vocab:benchmark/knucleotide/knucleotide-input.txt" ;

View File

@ -1,5 +1,5 @@
USING: kernel lcs math ;
in: benchmark.lcs
IN: benchmark.lcs
: lcs-benchmark ( -- )
f 50,000 [ drop "sitting" "kitten" levenshtein ] times 3 assert=

View File

@ -3,7 +3,7 @@
USING: io.encodings.ascii io.files kernel lexer math ;
in: benchmark.lexer
IN: benchmark.lexer
: lexer-benchmark ( -- )
10,000 "vocab:math/math.factor" ascii file-lines [

View File

@ -1,7 +1,7 @@
USING: assocs combinators fry kernel linked-assocs math
sequences ;
in: benchmark.linked-assocs
IN: benchmark.linked-assocs
: (linked-assocs-benchmark) ( -- )
10,000 iota <linked-hash> {

View File

@ -3,7 +3,7 @@
USING: kernel make math sequences ;
in: benchmark.make
IN: benchmark.make
: make-strings ( n -- seq )
[ [ char: a , ] times ] "" make ;

View File

@ -1,6 +1,6 @@
USING: math math.order kernel arrays byte-arrays sequences
colors.hsv accessors colors fry benchmark.mandel.params ;
in: benchmark.mandel.colors
IN: benchmark.mandel.colors
: scale ( x -- y ) 255 * >fixnum ; inline

View File

@ -4,7 +4,7 @@ USING: io kernel math math.functions sequences prettyprint
io.files io.files.temp io.encodings io.encodings.ascii
io.encodings.binary fry benchmark.mandel.params
benchmark.mandel.colors ;
in: benchmark.mandel
IN: benchmark.mandel
: x-scale ( -- x ) width 200000 zoom-fact * / ; inline
: y-scale ( -- y ) height 150000 zoom-fact * / ; inline

View File

@ -1,4 +1,4 @@
in: benchmark.mandel.params
IN: benchmark.mandel.params
CONSTANT: max-color 360 ;
CONSTANT: zoom-fact 0.8 ;

View File

@ -1,6 +1,6 @@
USING: locals math math.combinatorics math.matrices
prettyprint sequences typed ;
in: benchmark.matrix-exponential-scalar
IN: benchmark.matrix-exponential-scalar
:: e^m ( m iterations -- e^m )
{

View File

@ -1,6 +1,6 @@
USING: locals math math.combinatorics math.matrices.simd
prettyprint sequences typed ;
in: benchmark.matrix-exponential-simd
IN: benchmark.matrix-exponential-simd
TYPED:: e^m4 ( m: matrix4 iterations: fixnum -- e^m: matrix4 )
zero-matrix4

View File

@ -1,5 +1,5 @@
USING: checksums checksums.md5 sequences byte-arrays kernel ;
in: benchmark.md5
IN: benchmark.md5
: md5-benchmark ( -- )
2000000 iota >byte-array md5 checksum-bytes drop ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2012 John Benediktsson
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math memoize sequences ;
in: benchmark.memoize
IN: benchmark.memoize
MEMO: mem0 ( -- ) ;
MEMO: mem1 ( n -- n ) 1 + ;

View File

@ -1,5 +1,5 @@
USING: kernel math math.constants msgpack sequences ;
in: benchmark.msgpack
IN: benchmark.msgpack
: pack-sum ( seq -- n )
[ >msgpack msgpack> ] map-sum ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: fry kernel math random random.mersenne-twister ;
in: benchmark.mt
IN: benchmark.mt
: mt-bench ( n -- )
>fixnum 0x533d <mersenne-twister> '[ _ random-32* drop ] times ;

View File

@ -3,7 +3,7 @@
USING: kernel math namespaces ;
in: benchmark.namespaces
IN: benchmark.namespaces
symbol: foo
symbol: bar

View File

@ -4,7 +4,7 @@ USING: accessors alien.c-types fry kernel locals math
math.constants math.functions math.vectors math.vectors.simd
math.vectors.simd.cords math.parser combinators.smart sequences
hints classes.struct specialized-arrays io ;
in: benchmark.nbody-simd
IN: benchmark.nbody-simd
: solar-mass ( -- x ) 4 pi sq * ; inline
CONSTANT: days-per-year 365.24 ;

View File

@ -5,7 +5,7 @@ locals math math.constants math.functions math.vectors
prettyprint combinators.smart sequences hints arrays ;
FROM: alien.c-types => double ;
specialized-array: double
in: benchmark.nbody
IN: benchmark.nbody
: solar-mass ( -- x ) 4 pi sq * ; inline
CONSTANT: days-per-year 365.24 ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: math locals hints ;
in: benchmark.nested-empty-loop-1
IN: benchmark.nested-empty-loop-1
:: nested-empty-loop ( n -- )
n [

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.ranges sequences locals hints ;
in: benchmark.nested-empty-loop-2
IN: benchmark.nested-empty-loop-2
: times ( seq quot -- ) [ drop ] prepose each ; inline

View File

@ -1,6 +1,6 @@
USING: math math.parser sequences sequences.private kernel
bit-arrays make io math.ranges multiline fry locals ;
in: benchmark.nsieve-bits
IN: benchmark.nsieve-bits
: clear-flags ( step i seq -- )
2dup length >= [

View File

@ -1,4 +1,4 @@
in: benchmark.nsieve-bytes
IN: benchmark.nsieve-bytes
USING: math math.parser sequences sequences.private kernel
byte-arrays make io ;

View File

@ -1,6 +1,6 @@
USING: math math.parser sequences sequences.private kernel
arrays make io ;
in: benchmark.nsieve
IN: benchmark.nsieve
: clear-flags ( step i seq -- )
2dup length >= [

View File

@ -1,5 +1,5 @@
USING: kernel math math.parser sequences ;
in: benchmark.parse-bignum
IN: benchmark.parse-bignum
: parse-bignum-benchmark ( -- )
3000 iota [

View File

@ -1,5 +1,5 @@
USING: kernel math.parser sequences ;
in: benchmark.parse-fixnum
IN: benchmark.parse-fixnum
: parse-fixnum-benchmark ( -- )
2,000,000 iota [

View File

@ -1,6 +1,6 @@
USING: kernel literals math.functions math.parser random
sequences ;
in: benchmark.parse-float
IN: benchmark.parse-float
CONSTANT: test-floats $[ 100,000 random-units ] ;

View File

@ -1,6 +1,6 @@
USING: kernel literals math.parser math.vectors random
sequences ;
in: benchmark.parse-ratio
IN: benchmark.parse-ratio
CONSTANT: test-ratios $[
200,000 100,000 random-integers

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: make math math.functions kernel io io.styles prettyprint
combinators hints fry sequences ;
in: benchmark.partial-sums
IN: benchmark.partial-sums
! Helper words
: summing-integers ( n quot -- y ) [ 0.0 ] [ iota ] [ ] tri* '[ 1 + @ + ] each ; inline

View File

@ -4,7 +4,7 @@
USING: arrays formatting fry grouping io kernel locals math
math.functions math.matrices math.parser math.primes.factors
math.vectors prettyprint sequences sequences.deep ;
in: benchmark.pidigits
IN: benchmark.pidigits
: extract ( z x -- n )
[ first2 ] dip '[ first2 [ _ * ] [ + ] bi* ] bi@ /i ;

View File

@ -1,5 +1,5 @@
USING: kernel math random ;
in: benchmark.random
IN: benchmark.random
: random-benchmark ( -- )
1,000,000 [

View File

@ -1,5 +1,5 @@
USING: arrays kernel literals random sequences ;
in: benchmark.randomize
IN: benchmark.randomize
CONSTANT: data $[ 10,000,000 iota >array ] ;

View File

@ -5,7 +5,7 @@ USING: arrays accessors generalizations io io.files io.files.temp
io.encodings.binary kernel math math.constants math.functions
math.vectors math.vectors.simd math.vectors.simd.cords
math.parser make sequences words combinators ;
in: benchmark.raytracer-simd
IN: benchmark.raytracer-simd
COMPILE< SYNTAX: no-compile last-word t "no-compile" set-word-prop ; COMPILE>

View File

@ -6,7 +6,7 @@ math.constants math.functions math.vectors math.parser make
sequences sequences.private words hints ;
FROM: alien.c-types => double ;
specialized-array: double
in: benchmark.raytracer
IN: benchmark.raytracer
! parameters

View File

@ -1,5 +1,5 @@
USING: math kernel hints prettyprint io combinators ;
in: benchmark.recursive
IN: benchmark.recursive
: fib ( m -- n )
dup 2 <

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors io io.encodings.ascii io.files kernel sequences
assocs math.parser namespaces regexp benchmark.knucleotide ;
in: benchmark.regex-dna
IN: benchmark.regex-dna
! Based on http://shootout.alioth.debian.org/gp4/benchmark.php?test=regexdna&lang=ruby&id=1

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: arrays fry kernel math math.parser regexp sequences
strings ;
in: benchmark.regexp
IN: benchmark.regexp
: regexp-benchmark ( -- )
200

Some files were not shown because too many files have changed in this diff Show More