Hi Igor,
Oh, yeah..
i forgot to hash the strings.. for comparison:
|ss s t1 t2 t3 |
s := (WideString with: (Character value: 16r55E4)) , 'abcdefghijklmno'.ss := (String with: $z) , 'abcdefghijklmno'.
10 timesRepeat: [ s := s , s. ss := ss , ss ].
self assert: (s hash = s nbHash).t3 := [1000 timesRepeat: [ss hash]] timeToRun.
t1 := [1000 timesRepeat: [s hash]] timeToRun.
t2 := [1000 timesRepeat: [s nbHash]] timeToRun.
{ t1. t2. t3 }
#(11477 134 190)
so, WideString>>nbHash outperforms ByteString>>hash a little, for same
string sizes. ;)
--
Best regards,
Igor Stasenko AKA sig.