[squeak-dev] Pluggable Dictionaries (was: Collections-ct.972.mcz)

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Sat Feb 26 23:52:11 UTC 2022


Hi Chris,

> +1.  Especially a BlockClosure would be very bothersome.

Every PluggableDictionary has set nil for hashBlock and equalBlock initially and still works. The space overhead here is PluggableDictionary byteSizeOfInstance - Dictionary byteSizeOfInstance = 16 bytes/instance (*) and the time overhead is 4 bytecodes/scan loop. But yes, this still might be critical in some situations, and I respect this objection. :-)

* I am curious: Why is HashedCollection byteSizeOfInstance - Collection byteSizeOfInstance = 8 for two added instvars but PluggableDictionary byteSizeOfInstance - Dictionary byteSizeOfInstance for the same number of added instvars? Does the VM use some special compact object layout for classes with no more than two instvars?

Best,
Christoph

---
Sent from Squeak Inbox Talk

On 2022-01-09T17:49:44-06:00, asqueaker at gmail.com wrote:

> >
> > The idea is appealing indeed. :-)
> >
> > But I that believe another instvar on Dictionary would indeed bother some
> > people,
> 
> 
> +1.  Especially a BlockClosure would be very bothersome.
> 
> 
> > So I fear that pluggability needs indeed to be opt-in.
> 
> 
> +1
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220109/d4063193/attachment.html>
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220227/ccd6171d/attachment.html>


More information about the Squeak-dev mailing list