Improving containers library
John Meacham
john at repetae.net
Mon Mar 8 14:33:06 EST 2010
On Sat, Mar 06, 2010 at 06:19:46PM +0100, Bertram Felgenhauer wrote:
> This is actually a pointer comparison. I believe it can produce false
> negatives though, because indirections are not followed. If that's
> correct, a false negative may be turned into a positive by garbage
> collection. So use with care.
I am not sure what your intended use is, but a less obvious caveat when
using this technique to replace a use of (==) is that (==) is generally
strict, forcing a whole data structure, while pointer equality will not.
this may lead to a space leak if you arn't careful. It may not be an
issue for what you are doing though.
John
--
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the Libraries
mailing list