Comment by jesse__

5 hours ago

Go look at profiles for programs which have been written with performance in mind. Operating systems, databases, game engines, web servers, some compilers, video/audio/3d editing packages come to mind. I 100% guarantee these programs do not spend the majority of their runtimes in a tiny section of code. What you said is nearly-unilaterally untrue, at least for programs that care about real performance.

Static web servers I've actually seen spend most of their time in a couple of very hot paths (mostly the kernel's TCP stack). The others I agree with 100%, and also of course if your web server is doing any dynamic page work. Web browsers, too, and probably many important categories of software.