opEquals(const ref yadaYada)
Simen kjaeraas
simen.kjaras at gmail.com
Tue Dec 15 15:41:30 PST 2009
Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> On Mon, 14 Dec 2009 11:44:18 -0500, lws <invalid at email.com> wrote:
>
>> On 2009-12-14 07:01:47 -0800, dsimcha <dsimcha at yahoo.com> said:
>>
>> 1. Well, stuff like this is good warning to whomever about the code.
>> Since D is a imperative language, it should at least give you a warning
>> when you're doing something really inefficient that has a boilerplate
>> way of accomplishing it that is much faster.
>
> It's not faster, it's slower. Passing a reference to an integer or
> smaller value type is not as efficient passing the value type itself.
This is hardly true on modern architectures. I don't have the numbers on
it, but even for ints and floats, ref is just as fast (and sometimes
faster).
--
Simen
More information about the Digitalmars-d
mailing list