From: Dave Harris (brangdon_at_[hidden])
Date: 2005-06-24 19:12:12
> The hardest part is checking for equality. My proposal is
> to follow a hash-based approach, which is effective both in
> terms of complexity and space (one word per tracked object.),
> and does not impose any special requirement on the serialized
> objects (for instance, an approach based on operator== would
> require that objects be equalitycomparable).
Why do we need the test against 0? Is it supposed to improve performance?
Hashing ought to be cheap - it is just bit-twiddling on primitives - and
conditional branches are relatively expensive. It may be quicker to always
It might be worth using #ifndef _NDEBUG or similar, though.
-- Dave Harris, Nottingham, UK.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk