[Vm-dev] String comparison primitive preliminary speed-up result: 20-600x
bera.clement at gmail.com
Wed Feb 21 14:19:53 UTC 2018
And now on Mac (LLVM),
I get for string of size 3 (Misc primitive, Slang primitive, Slang + JIT
#('15,700,000 per second. 63.8 nanoseconds per run.'
'41,600,000 per second. 24 nanoseconds per run.'
'78,600,000 per second. 12.7 nanoseconds per run.')
for a string of size 1000:
#('841,000 per second. 1.19 microseconds per run.'
'1,500,000 per second. 666 nanoseconds per run.'
'2,190,000 per second. 457 nanoseconds per run.')
which is much closer to what I expected in the first place. The results we
got really surprised me but I could not figure out what was wrong.
I will update the post.
On Wed, Feb 21, 2018 at 3:13 PM, Clément Bera <bera.clement at gmail.com>
> 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
>> AsciiCollate := (0 to: 255) asByteArray.
>> [ByteString compare: var with: var collated: AsciiCollate] benchFor: 5
>> 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
> Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
Pharo consortium engineer
Bâtiment B 40, avenue Halley 59650 Villeneuve d'Ascq
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev