I perfectly get your point, Kyo. But you seem to have missed mine. My point is that on a PC, it doesn't matter if you have 4 or 8 bytes more memory overhead per vector. On a chip where memory is...
Type: Posts; User: Elysia
I perfectly get your point, Kyo. But you seem to have missed mine. My point is that on a PC, it doesn't matter if you have 4 or 8 bytes more memory overhead per vector. On a chip where memory is...
The same can be said about your manual approach. It's error prone and results in a lot more code. Why do it when you don't need it? Why throw away code that has been tested a lot and is known to be...
But a PC is not an IC chip. When working with PCs, use vector. When working with chips, avoid vectors unless the overhead is acceptable. There is no reason to generally avoid it.
Re constructors...
The vector overhead is negligible in 99% of the case, though. Don't avoid it unless you have measured a significant performance hit in it.