What they say, and they are right, that the creation of an object (and subsequent assembly) can be a major factor in time.
If you look at this example , you will see that at some point memory management dominated in time and was fixed by storing the used objects of each class in a free-list, so they could be reused efficiently.
However, also note that in this case, memory management was not the biggest problem. This became the biggest problem after removing even bigger problems.
For example, suppose you have a team of people who want to lose weight compared to another team. Suppose a team has 1) a person at 400 pounds, (which corresponds to some other problem)
2) 200 pound person (corresponding to the problem of memory management) and
3) a person at 100 pounds (corresponding to some other problem).
If the team as a whole wants to lose the most weight, where should it focus first?
Obviously, they need to work on all three, but if they miss the big guy, they are not going to go far.
So, the most aggressive procedure first finds out what is the biggest problem (without guessing), and fix it. Then the next largest, etc.
The big secret is not to guess. Everyone knows this, but what do they do? - they still guess. Guess, by definition, are often mistaken, lacking the biggest problems. Let the program tell you what the biggest problem is. (I use random suspension , as in this example.)
source share