so now we understand why Pharo design is crap :) Sorry I could resist.... It would be nice if we were a bit more adults. What is strange is that some people catalyze communication problems (me included) but we should live with that. I added your bench to the issue too. Stef On Aug 31, 2010, at 12:34 AM, Levente Uzonyi wrote:
And another with "SmallDoc":
smallDoc := ByteString new: 20 streamContents: [ :stream | 20 timesRepeat: [ stream nextPut: (Character value: 128 atRandom - 1) ] ]. (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc squeakToUtf8 ] ] timeToRun ]. "===> #(15 15 15 15 15)" (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc convertToWithConverter: UTF8TextConverter new ] ] timeToRun ]. "===> #(34 34 34 35 32)" (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc convertToEncoding: 'utf-8' ] ] timeToRun ]. "===> #(1256 1258 1259 1260 1260)"
smallDoc := ByteString new: 20 streamContents: [ :stream | 20 timesRepeat: [ stream nextPut: (Character value: 128 atRandom - 1) ] ]. smallDoc at: 10 put: (Character value: 129). (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc squeakToUtf8 ] ] timeToRun ]. "===> #(115 112 112 113 112)" (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc convertToWithConverter: UTF8TextConverter new ] ] timeToRun ]. "===> #(157 125 124 126 125)" (1 to: 5) collect: [ :run | [ 1 to: 100000 do: [ :ix | smallDoc convertToEncoding: 'utf-8' ] ] timeToRun ]. "===> #(1416 1419 1419 1429 1428)"