3 ms·
This structure (especially the optionality of the second pass) is how you end up with perfectly readable code iterating over List<T> when a hash map would suffi
by pc86 5y ago
This structure (especially the optionality of the second pass) is how you end up with perfectly readable code iterating over List<T> when a hash map would suffice and be orders of magnitude more performant.
Nobody can do it perfectly, but I think trying to keep personal nitpicks out of reviews as much as possible - ideally by codifying team nitpicks in automated formatting/.prettierrc/whatever - lets people focus on things that matter: what the code does and how it does it.
- watwut 5y agoThen again, that one is super easy to find and fix if it turns out to actually be problem.
- TheCoelacanth 5y agoIn perfectly readable code, it's easy to notice performance problems. In my experience, unreadable code is usually where the worst performance problems are, because that's where they are the hardest to find and fix. You seem to be conflating readability with formatting, which is not what I mean by readability. Poor and inconsistent formatting adds some friction to reading, but it's a relatively minor part of readability.