Status: FixedWaitingToBePharoed Owner: stephane...@gmail.com Labels: Milestone-1.3 Type-Squeak Difficulty-Easy New issue 3701 by stephane...@gmail.com: FloatArray>>dot: is defined in plugin but not at the image level http://code.google.com/p/pharo/issues/detail?id=3701 Name: Collections-ul.423 Author: ul Time: 7 February 2011, 8:55:57.134 pm UUID: e18716fc-a36b-874c-8946-5c21b447a96f Ancestors: Collections-ul.422 - use the primitive for FloatArray >> #dot: (~50x faster). =============== Diff against Collections-ul.422 =============== Item was changed: ----- Method: FloatArray>>dot: (in category 'arithmetic') ----- dot: aFloatVector "Primitive. Return the dot product of the receiver and the argument. Fail if the argument is not of the same size as the receiver." + | result | + <primitive: 'primitiveDotProduct' module: 'FloatArrayPlugin'> - "<primitive:'primitiveFloatArrayDotProduct'>" self size = aFloatVector size ifFalse:[^self error:'Must be equal size']. result := 0.0. 1 to: self size do:[:i| result := result + ((self at: i) * (aFloatVector at: i)). ]. ^result!