3 ms·
A part of code that should take, for instance, 3 to 5 CPU cycles to produce the desire output, to waste something like 25 to 40 CPU cycles.
by stefanos82 4y ago
A part of code that should take, for instance, 3 to 5 CPU cycles to produce the desire output, to waste something like 25 to 40 CPU cycles.
- noselasd 4y agoIf someone wrote a linear search on something that could be done with a binary search, that may perform a lot of unneded cycles (or it may not due cache misses in the binary search case). I don't think this is possible to quantify, you would need experts go through the orignal code to find optimization opportinities , and even then there would be an infinite number ways to achieve the same result or write the same program, many which could be more efficient