[Top][All Lists]

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

Re: Object identity

From: Stefan Monnier
Subject: Re: Object identity
Date: Tue, 21 Oct 2003 16:09:43 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> So let's try augmenting it with additional information, like a timestamp.
> This obviously can't be the time that object-identity was called, because
> then it will be different every time.  It needs to be something associated
> with the object itself, like the time it was created or the time that
> object-identity was first invoked on it.  This implies that every object
> needs to have a slot to store its creation time.  As a result, the size of
> every object will have to grow by at least 4 bytes.  Assuming cons cells
> are 8 bytes, this means increasing the space they use by 50%.  Since most
> objects in memory will never have object-identity called on them, this
> space is mostly wasted.

But since Java has such a function and Java is an attention-grabber, people
have been working on clever ways to implement this efficiently.

I still have no clue what it's useful for, so I tend to find such research
rather pointless.  But I'm probably just missing the point.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]