[Cuis] [Philosophy] Do we need pool dictionaries?

Frank Shearar frank.shearar at gmail.com
Tue Jul 30 05:59:26 CDT 2013


On 30 July 2013 11:49, Casey Ransberger <casey.obrien.r at gmail.com> wrote:
> This is something I've wondered about for awhile. I understand that pool dictionaries are convenient in uncommon cases. What I'm wondering, though, is whether or not we really need them.
>
> Does using pools give us a performance gain? (I'm guessing it does.)

If you threw out pool dictionaries, I guess you'd have to use message
sends to find out some value. Is that what you mean by a performance
gain?

> I can't think of an analogue to them in any other language I've used, though. I can't imagine that they're actually necessary unless there's something about Smalltalk that I don't understand (and I'm quite certain that there must be lots of things about Smalltalk that I don't understand yet!)

With the caveat that I've only just started looking at these guys
(because SharedPool lives in Squeak's System package, but several
Kernel classes use SharedPools), I'd say that they're something like a
limited mixin, in Ruby terminology. Or, if you prefer, if you needed a
pool dictionary in Ruby you'd use something like

  module MySharedPool
    ONE = 1
    TWO = 2
  end

  class MyClass
    include MySharedPool
  end

frank

> It seems like there could be some upside to ripping the entire concept out. OTOH if I had a pile of cash I'd hire some folks (you know who) to build out optimistic inlining in Cog and then rip out the concept of classes too, so of course I'm a bit of a radical. Call me an essentialist;)
>
> I wonder what folks on the list would think if I undertook the probably huge task of eliminating them. I've been eyeing that prize. And of course it would be fabulous to know why it's a bad idea if it's a bad idea.
>
> If its doable, I'd even go so far as to say that pools could be an external package for legacy code that needs them.
>
> Just what's on my mind this morning.
>
> --C



More information about the Cuis mailing list