upvote
> Data structures, not algorithms, are central to programming

So you agree that they should've designed the system to use the appropriate data structure from the beginning?

reply
Notice rules are ordered. You don't optimize until you know you need it. They started with a data structure they though would be fine. Clearly it was fine since it worked and they decided it was later worth optimizing.
reply
deleted
reply
The existence of 1.1.1.1 speaks to a much larger design problem. If you want to talk about what should have been done, you need to step much, much further back.
reply
I don't want to step back and go off topic
reply
"Should" cannot be evaluated in a vacuum. The only thing that would be off-topic is pretending that it can be.
reply
> Don't tune for speed until you've measured, and even then don't unless one part of the code overwhelms the rest.

Genuine question, is software performance really linear like that, that one can and should only fight the tightest bottleneck, one workload at a time? Never really sounded right.

It also sounds like the typical sleight of hand where the difficult bit is simply laundered a layer up, in this case the choice of what workload one investigates.

reply
It can be. Sometimes you take a profile and there's a big smoking gun and nothing else matters.

Sometimes it's a lot of small things everywhere and you can pick up significant performance after a lot of small value fixes. In this case, caching wire data instead of structured data is almost one of these, because the contribution to response time for serving a cache hit is small... otoh it happens so often than a small improvement matters; but this is a pretty focused use case, you usually hit the many smalln improvement issue in a less focused application where there are many code paths.

Sometimes the whole code structure / data structures are so wrong, but it works and perf is bad and profiling will never tell you. This article is not that case; these data structures only needed refinement.

reply