[squeak-dev] The Trunk: Collections-cbc.128.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 12 19:00:39 UTC 2009


Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-cbc.128.mcz

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

Name: Collections-cbc.128
Author: cbc
Time: 10 September 2009, 10:12:22 am
UUID: bdb0f892-6511-1645-8ed4-6ec11be0e473
Ancestors: Collections-dtl.127

Optimized Character>>digitValue for latin numbers, without removing ability to work with non-latin digits (full functionality remains).  The speedup for Latin conversions removes more than 26% of the time to convert a number (as tested via the String>>asNumber method).

=============== Diff against Collections-dtl.127 ===============

Item was changed:
  ----- Method: Character>>digitValue (in category 'accessing') -----
  digitValue
  	"Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0 
  	otherwise. This is used to parse literal numbers of radix 2-36."
+ 	| value |
+ 	
+ 	value := ('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' indexOf: self) - 1.
+ 	value >= 0 ifTrue: [^value].
- 
  	^ (EncodedCharSet charsetAt: self leadingChar) digitValue: self.
  !

Item was added:




More information about the Squeak-dev mailing list