[squeak-dev] The Inbox: Collections-cbc.652.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Sep 1 03:34:23 UTC 2015


A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-cbc.652.mcz

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

Name: Collections-cbc.652
Author: cbc
Time: 31 August 2015, 8:32:50.179 pm
UUID: 88079716-328d-4a41-8838-595e6782882c
Ancestors: Collections-cbc.651

#unsignedLong64At:put:bigEndian: on average fast.

=============== Diff against Collections-cbc.651 ===============

Item was changed:
  ----- Method: ByteArray>>unsignedLong64At:put:bigEndian: (in category 'platform independent access') -----
+ unsignedLong64At: index put: value bigEndian: aBool
+ 	"Minimize largeInteger arithmetic"
+ 	| ix |
+ 	aBool ifFalse: [
+ 		ix := index - 1.
+ 		1 to: 8 do: [:pos|
+ 			self at: ix + pos put: (value digitAt: pos)
- unsignedLong64At: index put: val bigEndian: aBool
- 	aBool 
- 		ifTrue: [
- 			self unsignedLongAt: index put: (val bitShift: -32) bigEndian: true.
- 			self unsignedLongAt: index+4 put: (val bitAnd: 16rFFFFFFFF) bigEndian: true.
- 			]
- 		ifFalse: [ 
- 			self unsignedLongAt: index put: (val bitAnd: 16rFFFFFFFF) bigEndian: false.
- 			self unsignedLongAt: index+4 put: (val bitShift: -32) bigEndian: false.
  			].
+ 	] ifTrue: [
+ 		ix := index + 8.
+ 		1 to: 8 do: [:pos|
+ 			self at: ix - pos put: (value digitAt: pos)
+ 			].
+ 	].
+ 	^value
- 	^val
  !



More information about the Squeak-dev mailing list