1 USING: classes classes.tuple kernel sequences vocabs math ;
2 IN: benchmark.dispatch1
4 GENERIC: g ( obj -- obj )
67 : my-classes ( -- seq )
68 "benchmark.dispatch1" words [ tuple-class? ] filter ;
70 : a-bunch-of-objects ( -- seq )
71 my-classes [ new ] map ;
73 : dispatch-benchmark ( -- )
74 1000000 a-bunch-of-objects
75 [ [ g drop ] each ] curry times ;
77 MAIN: dispatch-benchmark