[Vm-dev] Bug in Interpreter>>primitiveNextPut:
leves at elte.hu
Thu Nov 26 20:01:36 UTC 2009
On Thu, 26 Nov 2009, Eliot Miranda wrote:
> I wouldn't bother trying to fix the primitive. Both in VisualWorks and
> at Teleplace the experience has been the same, getting rid of the
> primitives for next, nextPut: and atEnd sped things up. The system is
> simply too complex nowadays for these primitives to pay for themselves
> because they only cover a small number of cases. The primitives support
> Array and ByteString bow there are so many different kinds of arrays being
> streamed over that the cost of primitive failures outweigh the benefits
> of primitive successes.
We are using these primitives in our own stream implementation like this:
[ position < readLimit ] whileFalse: [ self receiveData ].
^buffer at: (position := position + 1)
And it does make a difference (buffer is a 8kiB sized ByteArray). Would
this be faster without the primitive?
More information about the Vm-dev