dcollections 1.0 and 2.0a beta released

Michel Fortin michel.fortin at michelf.com
Thu May 20 04:17:29 PDT 2010


On 2010-05-20 06:34:42 -0400, Steven Schveighoffer <schveiguy at yahoo.com> said:

> I understand these points, but I'm already using interfaces to copy 
> data between containers.  I don't have to, I could have used generic 
> code, but this way, only one function is instantiated to copy data from 
> all the other containers.  The problem with using generic code is that 
> the compiler will needlessly duplicate functions that are identical.

One question. Have you calculated the speed difference between using an 
interface and using generic code? Surely going through all those 
virtual calls slows things down a lot.

I do like interfaces in principle, but I fear it'll make things much 
slower when people implement things in term of interfaces. That's why 
I'm not sure it's a good idea to offer container interfaces in the 
standard library.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/



More information about the Digitalmars-d-announce mailing list