Skip to content

Comment on Ask HN: Why do you waste CPU cycles?

Comments

Often it doesn't really matter which language you use. Your webapp written in C will be just as slow as one written in PHP if the queries you're writing are poor.

It is absolutely possible to write very fast applications in 'slow' languages by writing optimised code, optimised queries and caching intelligently.

If you see a slow application, chances are it's not slow because of the technology that the developer/company picked, it's probably slow because they just didn't care enough to make it fast.

I agree that sometimes the language you use does not matter, but how the developer does not care about the speed of his application. I am asking why the developer is wasting those CPU cycles.

Anyway comparing web site backend with compiled C to interpreted PHP is bad example when the language really does not matter as C is faster than any other language and PHP being one of the slowest.

Comparing python and php is another thing when both of them actually are interpreted languages and used for scripting web servers.

Anyway this is one place where personally even I do exchange cpu cycles for speed of development. The SQL queries will affect the same both of those languages.

Yes you can make any code to be fast it only needs to be optimized and compiled to binary.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.