[Pkg] The Trunk: Collections-eem.792.mcz

commits at source.squeak.org commits at source.squeak.org
Thu May 3 07:56:05 UTC 2018


Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.792.mcz

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

Name: Collections-eem.792
Author: eem
Time: 3 May 2018, 12:55:52.175146 am
UUID: 7d8995ed-835e-44b0-bf4c-0b0780f5c96f
Ancestors: Collections-pre.791

Four times faster implementation of isAsciiString.

=============== Diff against Collections-pre.791 ===============

Item was changed:
  ----- Method: String>>isAsciiString (in category 'testing') -----
  isAsciiString
+ 	"Answer if the receiver contains only ascii characters.
+ 	 Inline ^self allSatisfy: [ :each | each asciiValue <= 127 ] for speed."
+ 	1 to: self basicSize do: [:i| (self basicAt: i) > 127 ifTrue: [^false]].
+ 	^true!
- 
- 	^self allSatisfy: [ :each | each asciiValue <= 127 ]!



More information about the Packages mailing list