Add fast-path for <float-array> on 2 and 3 arguments

db4
Slava Pestov 2008-11-29 12:05:42 -06:00
parent b80e82b170
commit 8672f0d637
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel kernel.private alien.accessors sequences USING: kernel kernel.private alien.accessors sequences
sequences.private math math.private byte-arrays accessors sequences.private math math.private byte-arrays accessors
alien.c-types parser prettyprint.backend ; alien.c-types parser prettyprint.backend combinators ;
IN: float-arrays IN: float-arrays
TUPLE: float-array TUPLE: float-array
@ -67,6 +67,8 @@ M: float-array pprint* pprint-object ;
! Specializer hints ! Specializer hints
USING: hints math.vectors arrays ; USING: hints math.vectors arrays ;
HINTS: <float-array> { 2 } { 3 } ;
HINTS: vneg { array } { float-array } ; HINTS: vneg { array } { float-array } ;
HINTS: v*n { array object } { float-array float } ; HINTS: v*n { array object } { float-array float } ;
HINTS: n*v { array object } { float float-array } ; HINTS: n*v { array object } { float float-array } ;