int opEquals(Object), and other legacy ints
Bruno Medeiros
brunodomedeirosATgmail at SPAM.com
Fri Jul 21 04:17:50 PDT 2006
Walter Bright wrote:
> Stewart Gordon wrote:
>> There seem to be a number of leftovers from before we had a bool type,
>> and many people were using the int type to pass booleans around.
>
> They are typed as returning int for efficiency reasons. These functions
> often appear in performance critical loops, where an extra instruction
> or two makes a difference.
But isn't bool an int internally? Why is it less efficient to use a bool?
--
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-bugs
mailing list