Andreas Raab uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-cbc.47.mcz==================== Summary ====================
Name: Multilingual-cbc.47
Author: cbc
Time: 9 September 2009, 10:52:28 am
UUID: 56ff94d0-d886-3e4a-9c08-ca44ff2a57c2
Ancestors: Multilingual-ar.46
Improved speed of Unicode class>>digitValue: by roughly 26%, which is very significant when doing heavy conversions of strings to numbers. Should still be multilingual compatible.
=============== Diff against Multilingual-ar.46 ===============
Item was changed:
----- Method: MultiByteFileStream>>upTo: (in category 'public') -----
upTo: delim
| out ch |
+ out := WriteStream on: ((self isBinary ifTrue: [ByteArray] ifFalse: [String]) new: 1000).
- out := WriteStream on: (String new: 1000).
self atEnd ifTrue: [^ ''].
[(ch := self next) isNil] whileFalse: [
(ch = delim) ifTrue: [
^ out contents "terminator is not doubled; we're done!!"
].
out nextPut: ch.
].
^ out contents.
!
Item was changed:
----- Method: Unicode class>>digitValue: (in category 'class methods') -----
digitValue: char
+ "2009-09-02 CBC - Speedup the initial ASCII part of the conversion; leave the rest as is."
-
| value |
+ value := ('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' indexOf: self) - 1.
+ value >= 0 ifTrue: [^value].
+
value := char charCode.
- value <= $9 asciiValue
- ifTrue: [^value - $0 asciiValue].
- value >= $A asciiValue
- ifTrue: [value <= $Z asciiValue ifTrue: [^value - $A asciiValue + 10]].
-
value > (DecimalProperty size - 1) ifTrue: [^ -1].
^ (DecimalProperty at: value+1)
!
Item was removed:
- LanguageEnvironment subclass: #JapaneseEnvironment
- instanceVariableNames: ''
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Multilingual-Languages'!