object.opEquals return type
Sean Kelly
sean at invisibleduck.org
Tue Feb 26 14:31:38 PST 2008
== Quote from Max Samukha (maxsamukha at gmail.com)'s article
> Edward Diener wrote:
> > Why is the return type of object.opEquals an 'int' rather than a 'bool' ?
> Performance is supposed to be better with ints. It was discussed here:
> http://www.digitalmars.com/d/archives/digitalmars/D/bugs/7933.html#N7933
It was shown later in that same thread that there is no performance penalty for returning a bool. The
response is somewhat buried and it took me a while to find it last time I looked. However, Walter indicated
that he was unaware of the ASM instruction that allows for this improvement and so the back-end used by
DMD does something else instead which is much slower.
Sean
More information about the Digitalmars-d
mailing list