-USING: alien.c-types make math sequences splitting grouping
+USING: alien.c-types make math sequences grouping
kernel columns specialized-arrays bit-arrays ;
SPECIALIZED-ARRAY: double
IN: benchmark.dispatch2
: sequences ( -- seq )
[
- 1 ,
- 10 >bignum ,
+ 1 <iota> ,
+ 10 >bignum <iota> ,
{ 1 2 3 } ,
"hello world" ,
SBUF" sbuf world" ,
double-array{ 1.0 2.0 3.0 } ,
"hello world" 4 tail-slice ,
10 f <repetition> ,
- 100 2 <sliced-groups> ,
+ 100 <iota> 2 <groups> ,
"hello" <reversed> ,
{ { 1 2 } { 3 4 } } 0 <column> ,
?{ t f t } ,
: don't-flush-me ( obj -- ) drop ;
-: dispatch-test ( -- )
+: dispatch2-benchmark ( -- )
1000000 sequences
- [ [ 0 swap nth don't-flush-me ] each ] curry times ;
+ [ [ first don't-flush-me ] each ] curry times ;
-MAIN: dispatch-test
+MAIN: dispatch2-benchmark