[squeak-dev] Re: 2 raisedTo: 100000000` crashes VM

Bert Freudenberg bert at freudenbergs.de
Fri Jun 3 15:34:31 UTC 2016


One iteration of this “benchmark” is really just two dozen LargeInt multiplies (thanks to our logarithmic #raisedToInteger: implementation). The problem for most VMs is garbage, since the integers grow very fast very quickly. On the interpreter, 10 iterations do 580 (!) full GCs, whereas Cog “only” needs 30 full GCs. SqueakJS does 0 GCs.

- Bert -

> On 03.06.2016, at 14:25, timfelgentreff <timfelgentreff at gmail.com> wrote:
> 
> I'm fairly sure that the RSqueak JIT realizes that with both 2 and 100000000
> being constants in the doIt method, basic size is always going to return the
> same thing. In that case we're measuring the first ~1000 iterations, then
> the JIT time, and then only the cost of returning a constant.
> 
> 
> Fabio Niephaus-3 wrote
>> On my machine:
>> 
>> SqueakJS:  2832ms
>> RSqueak: 2523ms (*)
>> 
>> (*) using fallback Smalltalk code for large integer;
>> https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/bundle/RSqueak.zip
>> 
>> 
>> Maybe the JITs realize that the result of "2 raisedTo: ...." is not being
>> used and omit the calculation?
>> 
>> -- 
>> 
>> On Thu, Jun 2, 2016 at 12:24 PM Bert Freudenberg &lt;
> 
>> bert@
> 
>> &gt;
>> wrote:
>> 
>>> On 02.06.2016, at 03:19, Eliot Miranda &lt;
> 
>> eliot.miranda@
> 
>> &gt; wrote:
>>>> OK, tis fixed in VMMaker.oscog-eem.1879.
>>>> 
>>>> Reporting - 774 tallies, 6,836 msec.
>>> 
>>> Nice!
>>> 
>>> Is this finally a benchmark where SqueakJS can beat other VMs?
>>> 
>>> [10 timesRepeat: [(2 raisedTo: 100000000) basicSize]] timeToRun
>>> 
>>> Interp: 18042 ms
>>> Cog: 7965 ms
>>> Spur: ?
>>> SqueakJS: 2821 ms (*)
>>> 
>>> :D
>>> 
>>> - Bert -
>>> 
>>> (*)
>>> http://bertfreudenberg.github.io/SqueakJS/run/#url=http://freudenbergs.de/bert/squeakjs&files=[Squeak4.5-13680.image,Squeak4.5-13680.changes,SqueakV41.sources]
>>> 
>>> 
>>> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://forum.world.st/2-raisedTo-100000000-crashes-VM-tp4898583p4899014.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4207 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/d57f5d3c/smime.bin


More information about the Squeak-dev mailing list