←back to thread

205 points anurag | 3 comments | | HN request time: 0.768s | source
Show context
shanemhansen ◴[] No.45765342[source]
The unreasonable effectiveness of profiling and digging deep strikes again.
replies(1): >>45776616 #
hinkley ◴[] No.45776616[source]
The biggest tool in the performance toolbox is stubbornness. Without it all the mechanical sympathy in the world will go unexploited.

There’s about a factor of 3 improvement that can be made to most code after the profiler has given up. That probably means there are better profilers than could be written, but in 20 years of having them I’ve only seen 2 that tried. Sadly I think flame graphs made profiling more accessible to the unmotivated but didn’t actually improve overall results.

replies(4): >>45777180 #>>45777265 #>>45777691 #>>45783146 #
Negitivefrags ◴[] No.45777265[source]
I think the biggest tool is higher expectations. Most programmers really haven't come to grips with the idea that computers are fast.

If you see a database query that takes 1 hour to run, and only touches a few gb of data, you should be thinking "Well nvme bandwidth is multiple gigabytes per second, why can't it run in 1 second or less?"

The idea that anyone would accept a request to a website taking longer than 30ms, (the time it takes for a game to render it's entire world including both the CPU and GPU parts at 60fps) is insane, and nobody should really accept it, but we commonly do.

replies(4): >>45777574 #>>45777649 #>>45777878 #>>45779600 #
javier2 ◴[] No.45777574[source]
its also about cost. My game computer has 8 cores + 1 expensive gpu + 32GB ram for me alone. We dont have that per customer.
replies(3): >>45777680 #>>45777764 #>>45778893 #
1. oivey ◴[] No.45777764[source]
This is again a problem understanding that computers are fast. A toaster can run an old 3D game like Quake at hundreds of FPS. A website primarily displaying text should be way faster. The reasons websites often aren’t have nothing to do with the user’s computer.
replies(1): >>45778020 #
2. paulryanrogers ◴[] No.45778020[source]
That's a dedicated toaster serving only one client. Websites usually aren't backed by bare metal per visitor.
replies(1): >>45778187 #
3. oivey ◴[] No.45778187[source]
Right. I’m replying to someone talking about their personal computer.