[squeak-dev] Two new curious Context/primitive questions :-)

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jan 1 19:28:34 UTC 2021


Hi all, hi Eliot,


new year, new simulation fun, and I have collected two new questions about the Context implementation which I'd love to get answered here:


First, I was confused by the following:

(BlockClosure >> #numArgs) primitive. "266"
(Context >> #pc) primitive. "0"
What makes Context so special that it cannot be compiled with quick accessor methods?

Second, Context >> #isPrimFailToken: attracted my attention multiple times when looking at different #timeProfile results of simulation sessions. In the expression [100000 factorial] it takes up more than 44% of the whole execution time!
I have no idea why it could be so slow, but this message is sent really often, which is at least 2 times per simulation of a special message send.
Would there be an easy change to resolve this bottleneck and speed up the simulation by 40% or more?
Would it be possible to provide a primitive for this method? Or do you see any other way to optimize it?

Best,
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210101/71b98a62/attachment.html>


More information about the Squeak-dev mailing list