4 ms·
I'm going to disagree with most of the comments here which say that you can't become faster, as I have become notably faster over the past couple of years (perh
by yoklov 12y ago
I'm going to disagree with most of the comments here which say that you can't become faster, as I have become notably faster over the past couple of years (perhaps 1.5-2x faster!!).
Basically, it was a fairly major coding style change that happened after working with others in my industry (game development) and seeing their prolific output of high quality code.
My process for writing code used to be:
- Identify problem.
- Identify the abstractions that fit the problem
- Implement those abstractions
- Write code to solve problem using those abstractions.
Now it is
- Identify problem.
- Write code to solve problem, pulling abstractions out if and only if they make sense and would actually be used.
Honestly, I feel this leads to much better, cleaner and more understandable code, however, it tends not to mesh well with what some people consider best practices.
The resulting code tends to not be particularly object oriented, tends to have large functions, and tends to perform very well due to having a very small distance from what the code says to what actually needs to be executed by the processor.
For more on this approach, see
[0]: http://number-none.com/blow/john_carmack_on_inlined_code.html http://number-none.com/blow/john_carmack_on_inlined_code.htm...
[1]: http://mollyrocket.com/casey/stream_0019.html http://mollyrocket.com/casey/stream_0019.html
[2]: https://www.youtube.com/watch?v=rX0ItVEVjHc https://www.youtube.com/watch?v=rX0ItVEVjHc