3 ms·
A simple rule is that more instructions mean more execution time and more people time. The first of those is not always true, but the second of those is genera
by austincheney 8y ago
A simple rule is that more instructions mean more execution time and more people time. The first of those is not always true, but the second of those is generally always true.
The total instruction count is the number of instructions from the source code that are actually executed. This isn't the lines of code that people read. For example a loop may comprise 100 iterations and 3 lines of code. That loop will likely result in 300 instructions. If a loop contains a child loop than the instruction count is something like:
(iterations * overhead) * (iterations * overhead)
I am not a fan of OOP programming because there tends to be a lot of overhead. I understand this overhead helps to bind things together at writing time and share resources at execution time, but at maintenance time years and hundreds of developers later its often a catastrophic mess. I would rather the binding be an explicit call to a reference that I can read opposed to reasoning about flow control that isn't evident from reading the source code.
I am also not a fan of pronouns, which in some languages is the this keyword. If I have to guess what a reference is contextually I am wasting time that could be better spent making a code change.