Quote:Original post by Bregma
Quote:Original post by Anonymous Poster
It's not the bloat of vector it's from the fact, that you have duplicated code fpr every instanziation. Therefore it is better to use a generic void* vector and then cast it to the right type (this could be in a template, as mentioned some posts before).
You don't think partial specialization is good enough? Could you post your profiling results?
The point is that even partial specialisation creates more code than using a generic void*. For every type he wants to use, the preprocessor will generate the code to handle that type. That's what templates
do, and as remarkably useful as they are, they do increase code-size. It's not about speed (unless you meant code-size when talking about "profiling", in which case, you know that already).