04.07.2015, 16:53
Quote:
That's the reason why I don't care about speed, I rather is more practical and concerned about the efficiency of gameplay and try reducing lag.
Optimizing such like using individual vars from arrays doesn't matter. And I would have answered the same to Y_Less as well. |
He was the best programmer here at the forums unfortunately left us.
There was a thread written by Y_Less titled "Code Optimizations" which has been deleted since he left the community. No one hasn't re-posted it till now.
But just to let you know there were at least 25 optimization tricks in that thread. Even the ones like
Code:
if( (variable = func()) == 1) VS variable = func(); if(variable == 1)
Most of them who claimed that they make negligible improvements have apologized for the false claims. I have provided you the speed tests, what more do you want? It is obvious from the tests that most of the tricks improve the performance of the code in multiples like 3x,4x,5x,6x,7x.
Quote:
I'm not sure if that is the best possible implementation, but I suppose you're right, I forgot about the virtual machine.
The example I gave was from a test in c++ when checking the performance of a native function vs a more advanced implementation. |
The efficiency of libraries and C++ code will be almost the same provided the programmer knows how to write efficient code.
When I try to re-invent the wheel in C++ just to optimize, it never works because the C++ libraries are written by professionals and are very efficient whereas I am not that professional in C++.