|
|
|
|
|
by josmala
2899 days ago
|
|
The Amdahl's law applies here also, if your code is slow everywhere, making the slowest part faster isn't going to help much, so there needs to be some basic minimal consideration given the performance throughout the project.
Or better yet, have well performing default ways of doing things and avoid badly performing ways. In worst case failing to do that will require write entire project from scratch because basic data structures and structure of code is antithesis for performance and there is not a point that you can optimize.
A reasonable default is using vectors over linked lists.
A more complex choice is using struct of vectors rather than vector of structs. And neither of those choices are easy to do for data structures that really matter late in the project. |
|