I think for me it would be a for loop in a cron job I run on work's servers - not very exciting! I am sure HN has many more interesting examples.
maybe you have written code:
- deep in an OS that handles memory management?
- that is deeply distributed?
- that is in every JS lib? ~~cough cough left pad cough~~
- maybe it is an accidental infinite loop you once wrote?
I wrote the billing/logging system and I am certain the main "method call logger" is by far the most frequently executed code I have ever written. It was called by any method that the author wanted to be compensated for. Alas, I was not allowed to include the call to this method in the compensation pool :-(
I got a good overall speedup (over 5% in code that was already pretty well-optimised) but by far the most valuable optimisation I did was one of the most basic - hoisting variables out of for loops. This kind of thing
for(int i=0; i
changes to... int x;
for(int i=0; i
There are slightly more subtle versions of that, but at the time none of the compilers we were using (gcc 3.2, solaris 8 C++ compiler or Visual C++ 7) could optimise that without you doing the hoist yourself.
It's not as cool as being a frequent call at the OS level, but pretty good for an ex web developer.
I think it's very likely still in use, in some part, and surely into the billions of deliveries, so who knows how many executions of some inner loops or whatever.
Simple primitive stuff like that tends to get embedded in a variety of other automation.
Philosophically: print debugging.
@login_required
def mutate(...):
import numpy