[Vm-dev] String comparison primitive preliminary speed-up result: 20-600x

Clément Bera bera.clement at gmail.com
Wed Feb 21 14:13:18 UTC 2018


Right I knew something was off.

Let me patch this.

On Wed, Feb 21, 2018 at 3:00 PM, Henrik Sperre Johansen <
henrik.s.johansen at veloxit.no> wrote:

>
> Ref. blog post, are you sure you are measuring equivalent entities?
> Usually the AsciiOrder is a constant, preallocated array, no?
>
> Seems to me, with the code posted in blog post, you're mostly measuring
> array instantation, not collate...
>
> var := ByteString new: 3.
>
>  [ByteString compare: var with: var collated: (0 to: 255) asByteArray]
> benchFor: 5 second.
> a BenchmarkResult(500,460 iterations in 5 seconds 1 millisecond. 100,072
> per
> second)
>
> AsciiCollate := (0 to: 255) asByteArray.
>
>  [ByteString compare: var with: var collated: AsciiCollate] benchFor: 5
> second.
>
> a BenchmarkResult(79,507,782 iterations in 5 seconds 2 milliseconds.
> 15,895,198 per second)
>
>
>
> --
> Sent from: http://forum.world.st/Squeak-VM-f104410.html
>



-- 
Clément Béra
Pharo consortium engineer
https://clementbera.wordpress.com/
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180221/1db78d3a/attachment.html>


More information about the Vm-dev mailing list