Changes between Version 2 and Version 3 of CodeAndMemoryPerformance
- Timestamp:
- May 11, 2013, 8:50:08 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodeAndMemoryPerformance
v2 v3 8 8 * memory storage is cheap, cpu cycles less so and memory access not at all. So prefer memory duplication over any computation or memory access. ie: Don't use std::map with int index, where you can have a sparse vector indexed structure, which is way much faster, meaning there should be no iteration over a std::map 9 9 * prefer using std::iterators over checking against size() in loop condition. (size is recomputed at each call, unless container is "const") 10 *10 11 11 12 12 = Memory Performance =