M
Mike Copeland
I've encountered a strange (to me) situation as I migrate a lot of C-
based code to C++ code and structures. (Using VS10 Express.)
Specifically, as I convert large data arrays (both structures and POD
arrays) to vectors, the executable files grow and grow (!). Once I
change one array to a vector (and accept the STL runtime expansion), I
would expect that changing more data in the same program would, at
worst, keep the executable size static. At best, I had hoped the
programs would shrink...because allocating large data areas (e.g. int
[60000] -> vector{int>) would produce less code and smaller executables.
In fact, the opposite of my expectations occurs: the more I change,
the larger the programs grow (no other changes or functionality mods).
This really surprises me, as I had thought STL code would be smaller
and more efficient... 8<{{
Any thoughts on this? TIA
based code to C++ code and structures. (Using VS10 Express.)
Specifically, as I convert large data arrays (both structures and POD
arrays) to vectors, the executable files grow and grow (!). Once I
change one array to a vector (and accept the STL runtime expansion), I
would expect that changing more data in the same program would, at
worst, keep the executable size static. At best, I had hoped the
programs would shrink...because allocating large data areas (e.g. int
[60000] -> vector{int>) would produce less code and smaller executables.
In fact, the opposite of my expectations occurs: the more I change,
the larger the programs grow (no other changes or functionality mods).
This really surprises me, as I had thought STL code would be smaller
and more efficient... 8<{{
Any thoughts on this? TIA