Benchmarking JavaScript Is A Mess
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
The Bullsh** Benchmark
The PrimeTime
84.3k views
Linus x Linus - Is AI A Bubble?
ThePrimeTime
37.4k views
TheStandup - Omarchy Is Amazing
ThePrimeTime
69.9k views
Things are breaking down
ThePrimeTime
48.7k views
Is AI Giving You Donkey Brains?
ThePrimeTime
131.1k views
Coding Should Be A Vibe
ThePrimeTime
154.3k views
BUILDING A GAME IN 7 DAYS
ThePrimeTime
89.8k views
Vibe Coding Is The Future
ThePrimeTime
601.2k views
Doom In TypeScript Types???
ThePrimeTime
133.8k views
Why Buying GPUs Is a Disaster
ThePrimeTime
211.0k views
Top Comments (10)
Bro never benchmark JS. I know a guy who benchmarked JS. He died. Was it because he benchmarked JS? Who knows, but to be safe, I wouldn't.
remove benchmarking from the title
I miss these reading an article videos. Helps me keep up with where programming is at when I can't catch live.
Knuth was NOT talking about optimizing to assembly when writing in C. He was saying programmers should not waste time in optimizing the 97% of their application that doesn’t matter but should also feel enabled to optimize “that critical 3%” that does matter
9:40 Premature optimization is bad in the sense that you shouldn't write bit hacks or SIMD when it may not matter or worse may cause optimization not to happen (sometimes a bit shift may prevent the compiler to do a better job). Of course, that doesn't mean you should write bad code with awful performance. There is something in between: Working, decent but you didn't try to optimize further.
Most of my performance issues are me being an asshole and creating a million objects or running some absolute dogshit query.
There's only a few things I consider when thinking about performance: how many times am I iterating over this list, can I organize this data in one step and then process it easier in another, how many network requests am I making, how many promises can I remove/ combine. My company's code base has several places with O(n^3) loops with awaited network requests, repeated twice for no reason, and mongo cursors with batch sizes of 1 that expect to pull thousands of results. I've turned 10 minute functions into 5 second functions by breaking the nested loops, increasing batch sizes, and not waiting for network requests it doesn't care about. There was even a place that made a network request, and then checked a local cache to determine if the network request was needed. Do less, and be most averse to sequential network requests.
Premature abstraction is roughly 3,432,872 times worse than premature optimizations.
solution: stop running JS on the server when it was never meant to run anywhere other than in the browser
benchmarking is good, you just need to do it in right way, like using real world load based on what you will do in production, like testing it with your production data, not hello world or for loop. so you know if this one really fits for my spesific use case
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
Bro never benchmark JS. I know a guy who benchmarked JS. He died. Was it because he benchmarked JS? Who knows, but to be safe, I wouldn't.
remove benchmarking from the title
I miss these reading an article videos. Helps me keep up with where programming is at when I can't catch live.
Knuth was NOT talking about optimizing to assembly when writing in C. He was saying programmers should not waste time in optimizing the 97% of their application that doesn’t matter but should also feel enabled to optimize “that critical 3%” that does matter
9:40 Premature optimization is bad in the sense that you shouldn't write bit hacks or SIMD when it may not matter or worse may cause optimization not to happen (sometimes a bit shift may prevent the compiler to do a better job). Of course, that doesn't mean you should write bad code with awful performance. There is something in between: Working, decent but you didn't try to optimize further.
Most of my performance issues are me being an asshole and creating a million objects or running some absolute dogshit query.
There's only a few things I consider when thinking about performance: how many times am I iterating over this list, can I organize this data in one step and then process it easier in another, how many network requests am I making, how many promises can I remove/ combine. My company's code base has several places with O(n^3) loops with awaited network requests, repeated twice for no reason, and mongo cursors with batch sizes of 1 that expect to pull thousands of results. I've turned 10 minute functions into 5 second functions by breaking the nested loops, increasing batch sizes, and not waiting for network requests it doesn't care about. There was even a place that made a network request, and then checked a local cache to determine if the network request was needed. Do less, and be most averse to sequential network requests.
Premature abstraction is roughly 3,432,872 times worse than premature optimizations.
solution: stop running JS on the server when it was never meant to run anywhere other than in the browser
benchmarking is good, you just need to do it in right way, like using real world load based on what you will do in production, like testing it with your production data, not hello world or for loop. so you know if this one really fits for my spesific use case