[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PCL Bombing on dynamic slots



I should have put a more careful explanation of the demise of :dynamic
slots in my previous message.

After looking at :dynamic slots carefully, we decided that in almost all
cases, they did not give an advantageous space/performance tradeoff.

Basically -

   just providing :dynamic slots as an option means that every instance
of every class with meta-class class, is one word bigger.  Regardless of
whether the class uses :dynamic slots.


  for instances which do have :dynamic slots, it takes 4 words of
storage to store the value of the slot rather than the 1 word it takes
if the slot is a :instance slot.

When you add this up :dynamic slots just don't seem worth it, most
programs which did use them will do just as well or better to use
:instance (the default) slots.

Of course, for a program which reall does want something like :dynamic
slots, its pretty easy to do using the meta-object protocol.