benchmark.nbody-simd: use map-reduce instead of reduce

db4
Slava Pestov 2009-09-04 03:01:41 -05:00
parent 4a2823b2eb
commit 32ecb5d49b
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ STRUCT: body
TUPLE: nbody-system { bodies struct-array read-only } ;
: init-bodies ( bodies -- )
[ first ] [ double-4{ 0 0 0 0 } [ [ velocity>> ] [ mass>> ] bi v*n v+ ] reduce ] bi
[ first ] [ [ [ velocity>> ] [ mass>> ] bi v*n ] [ v+ ] map-reduce ] bi
offset-momentum drop ; inline
: <nbody-system> ( -- system )