|
|
|
|
|
by flohofwoe
4424 days ago
|
|
I think the list goes into too great detail, it feels like half of the points are taken care of by the compiler and may change with the used optimization switches or target CPU. For instance: "use shift instead of mul or div", I remember that this was an issue in the early 90's, but I think every modern compiler should be able to figure this out. Or the general advice to pass by-references instead of by-value, this actually backfired on the early Xbox SDK compilers which had SSE-style vector registers, and where it was better to explicitely pass those by-value, since then the compiler would put them into registers (later compiler version would figure this out by themselves, even if pass-by-ref was used). In general, there's no way around inspecting the generated assembly code while trying out different optimizer switches and code tweaks, and running the code through a profiler. |
|