Ask Slashdot: What's the Most Often-Run Piece of Code -- Ever?
Hugo Villeneuve writes "What piece of code, in a non-assembler format, has been run the most often, ever, on this planet? By 'most often,' I mean the highest number of executions, regardless of CPU type. For the code in question, let's set a lower limit of 3 consecutive lines. For example, is it:
- A UNIX kernel context switch?
- A SHA2 algorithm for Bitcoin mining on an ASIC?
- A scientific calculation running on a supercomputer?
- A 'for-loop' inside on an obscure microcontroller that runs on all GE appliance since the '60s?"
Every Ask Slashdot gets a comment pointing out that it's the dumbest Ask Slashdot ever, I know.
This time, it's really, really the case.
CLI paste? paste.pr0.tips!
Question: What piece of code, in a non-assembler format, has been run the most often, ever, on this planet? By 'most often,' I mean the highest number of executions, regardless of CPU type.
Answer: Genetic code.
Perhaps a pixel shader in a modern video game on console or PC, executed per pixel at HD resolution, and for hours (average play time) on tens of millions of machines?
Could be approaching 10^20 executions.
Lets approach this analytically.
What platform has the most computation power (number of CPUs x speed)?
Due to the increase in speed, we can disregard any CPUs built before 2000.
In number, mobile phones are the largest platform. So I would reckon, some GSM codec/cipher.
I think, for now, microcontrollers can be ignored, because they have much lower computational power.
Desktops and supercomputers have more power, but are they excessing the mobile phones? If they are a relevant portion, then across mobile phones and desktops, perhaps some code related to network access is the most-run.
I doubt it would be something kernel-related (like bootup, context-switching), because the kernel usually does not (or should not) take up a lot of the computing time. If we go by number of entries only, then perhaps some networking code.
If so, I'm not sure which layer to look into though. The lower ones are called more often, but media is not the same across use cases.
NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
Actually, it's likely not executed that many times - the CPU goes into HALT when idle, and wakes up when there's work to do. Gone are the days of endlessly spinning....
The Idle Process may be more book-keeping artifact than actual code.
How could this ever be more than a guess? How could it ever be determined, documented, or verified?
How many piano tuners are there in Chicago?
[Fuck Beta]
o0t!