[go-nuts] Re: Generics false dichotomy]

Daniel Murphy yebbliesnospam at gmail.com
Mon Feb 17 18:24:20 PST 2014


"ponce"  wrote in message news:loreiqmesicuysdtmgvb at forum.dlang.org...

> I heard a story of a C++ gamedev team that would use type-punning to 
> reduce code size. std::vector<void*> would be the only instantiation of 
> std::vector + casts everywhere. That was for console binaries.

We had a similar thing in the compiler for a long time, with void* arrays 
underneath and a very thin (inlineable) typesafe wrapper on top.  I met a 
lot of resistance when trying to change it to a fully templated struct, 
until benchmarking showed the performance difference was negligible. 



More information about the Digitalmars-d mailing list