Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


I do write and profile software of that kind and this experience is why I know this isn't a myth. Any mature program has a whole lot of code that actually isn't performance critical at all. For example, 3d software needs a really huge amount of GUI and other support code that isn't performance critical at all. The performance hotspots are really just individual functions doing the core of the processing work for any of the features it offers. The initiation/scaffolding code around that just doesn't matter. The same translates to all other software that that I have worked on.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: