

3·
13 days agoVery likely - but that’s not going to happen. Some people will watch less, some will complain but keep watching the same amount, and the majority will just take it as a fact of life and not change their behaviour.
Very likely - but that’s not going to happen. Some people will watch less, some will complain but keep watching the same amount, and the majority will just take it as a fact of life and not change their behaviour.
A nice post, and certainly worth a read. One thing I want to add is that some programmers - good and experienced programmers - often put too much stock in the output of profiling tools. These tools can give a lot of details, but lack a bird’s eye view.
As an example, I’ve seen programmers attempt to optimise memory allocations again and again (custom allocators etc.), or optimise a hashing function, when a broader view of the program showed that many of those allocations or hashes could be avoided entirely.
In the context of the blog: do you really need a multi set, or would a simpler collection do? Why are you even keeping the data in that set - would a different algorithm work without it?
When you see that some internal loop is taking a lot of your program’s time, first ask yourself: why is this loop running so many times? Only after that should you start to think about how to make a single loop faster.