[Pkg] The Trunk: Collections-ul.423.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 10 22:29:33 UTC 2011

Levente Uzonyi uploaded a new version of Collections to project The Trunk:

==================== Summary ====================

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)).

More information about the Packages mailing list