"Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> wrote in message
Karl Uppiano wrote:
They simply could not justify the performance overhead of allocating
objects for every data type, even automatic variables on the stack.
There are fairly well-known techniques for avoiding that overhead. The
most
widely used is to encode "some" values directly in what would otherwise be
pointers (pointers to objects in almost any sane implementation will have
some
spare low-bits since the objects won't be aligned on arbitrary
byte-boundaries). That doesn't work at all for, say, 64-bit longs on a
32-bit
machine, but where it is applicable it works well -- nearly all serious
Smalltalk implementations use it, for instance, and I assume it is also
widely
used in the Lisp world (they invented it, after all ;-).
Alternatively, I suspect that the state of the art in dynamic optimisation
has
advanced far enough that nearly all (performance critical) use of boxed
integers could be optimised away.
Ok. But overhead was the argument given when I first heard the question
answered ten years ago. I certainly do not have the inside story on every