4 ms·
Not to be mean, but how was any of this hard? True, I work on server-side development and I'm not a neckbeard, but this is part of my day-to-day job and I think
by joshhart 14y ago
Not to be mean, but how was any of this hard? True, I work on server-side development and I'm not a neckbeard, but this is part of my day-to-day job and I think the approach is pretty straightforward.
Step 1. Design a test performance data set. Great if it comes from your production data!
Step 2. Run your algorithm and attach a profiler.
Step 3. Look at any method about 5% utilization. Can you use a better algorithm, more compact data structure, improve memory locality, or tighten the loop? Googling for fast hash functions would give you a good answer here.
Step 4. Repeat steps 2-3 until you give up.
The difference with this pull request is the level of documentation that went into it. We're impressed because nobody shows these levels of documentation and humor when writing about their change. That's what's impressive.
- nolok 14y agoOn one hand I agree with you completely about its apparent "obviousness". On the other, I've seen so many devs that wouldn't even have been able to go through the process of identifying properly what to change, let alone do it, that I can recognize this pull as great. The reality is that a majority of coders out there do not know how to properly do their job and they do not even know it (thus they don't try to improve). (but to be fair, that's also what allow us to ask for the kind of salary we get)