Update benchmarks for >r/r> removal
parent
49eeef4c35
commit
977f5da07d
|
@ -10,8 +10,8 @@ C: <tree-node> tree-node
|
||||||
dup 0 > [
|
dup 0 > [
|
||||||
1 -
|
1 -
|
||||||
[ drop ]
|
[ drop ]
|
||||||
[ >r 2 * 1 - r> bottom-up-tree ]
|
[ [ 2 * 1 - ] dip bottom-up-tree ]
|
||||||
[ >r 2 * r> bottom-up-tree ] 2tri
|
[ [ 2 * ] dip bottom-up-tree ] 2tri
|
||||||
] [
|
] [
|
||||||
drop f f
|
drop f f
|
||||||
] if <tree-node> ; inline recursive
|
] if <tree-node> ; inline recursive
|
||||||
|
|
|
@ -29,7 +29,7 @@ IN: benchmark.knucleotide
|
||||||
: small-groups ( x n -- b )
|
: small-groups ( x n -- b )
|
||||||
swap
|
swap
|
||||||
[ length swap - 1+ ] 2keep
|
[ length swap - 1+ ] 2keep
|
||||||
[ >r over + r> subseq ] 2curry map ;
|
[ [ over + ] dip subseq ] 2curry map ;
|
||||||
|
|
||||||
: handle-table ( inputs n -- )
|
: handle-table ( inputs n -- )
|
||||||
small-groups
|
small-groups
|
||||||
|
|
|
@ -6,7 +6,7 @@ bit-arrays make io ;
|
||||||
2dup length >= [
|
2dup length >= [
|
||||||
3drop
|
3drop
|
||||||
] [
|
] [
|
||||||
f 2over set-nth-unsafe >r over + r> clear-flags
|
f 2over set-nth-unsafe [ over + ] dip clear-flags
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
||||||
: (nsieve-bits) ( count i seq -- count )
|
: (nsieve-bits) ( count i seq -- count )
|
||||||
|
@ -14,7 +14,7 @@ bit-arrays make io ;
|
||||||
2dup nth-unsafe [
|
2dup nth-unsafe [
|
||||||
over dup 2 * pick clear-flags
|
over dup 2 * pick clear-flags
|
||||||
rot 1+ -rot ! increment count
|
rot 1+ -rot ! increment count
|
||||||
] when >r 1+ r> (nsieve-bits)
|
] when [ 1+ ] dip (nsieve-bits)
|
||||||
] [
|
] [
|
||||||
2drop
|
2drop
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
|
@ -6,7 +6,7 @@ byte-arrays make io ;
|
||||||
2dup length >= [
|
2dup length >= [
|
||||||
3drop
|
3drop
|
||||||
] [
|
] [
|
||||||
0 2over set-nth-unsafe >r over + r> clear-flags
|
0 2over set-nth-unsafe [ over + ] dip clear-flags
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
||||||
: (nsieve) ( count i seq -- count )
|
: (nsieve) ( count i seq -- count )
|
||||||
|
@ -14,7 +14,7 @@ byte-arrays make io ;
|
||||||
2dup nth-unsafe 0 > [
|
2dup nth-unsafe 0 > [
|
||||||
over dup 2 * pick clear-flags
|
over dup 2 * pick clear-flags
|
||||||
rot 1+ -rot ! increment count
|
rot 1+ -rot ! increment count
|
||||||
] when >r 1+ r> (nsieve)
|
] when [ 1+ ] dip (nsieve)
|
||||||
] [
|
] [
|
||||||
2drop
|
2drop
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
|
@ -6,7 +6,7 @@ arrays make io ;
|
||||||
2dup length >= [
|
2dup length >= [
|
||||||
3drop
|
3drop
|
||||||
] [
|
] [
|
||||||
f 2over set-nth-unsafe >r over + r> clear-flags
|
f 2over set-nth-unsafe [ over + ] dip clear-flags
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
||||||
: (nsieve) ( count i seq -- count )
|
: (nsieve) ( count i seq -- count )
|
||||||
|
@ -14,7 +14,7 @@ arrays make io ;
|
||||||
2dup nth-unsafe [
|
2dup nth-unsafe [
|
||||||
over dup 2 * pick clear-flags
|
over dup 2 * pick clear-flags
|
||||||
rot 1+ -rot ! increment count
|
rot 1+ -rot ! increment count
|
||||||
] when >r 1+ r> (nsieve)
|
] when [ 1+ ] dip (nsieve)
|
||||||
] [
|
] [
|
||||||
2drop
|
2drop
|
||||||
] if ; inline recursive
|
] if ; inline recursive
|
||||||
|
|
Loading…
Reference in New Issue