3 ms·
makes me think of https://ericlippert.com/2020/03/27/new-grad-vs-senior-dev/ https://ericlippert.com/2020/03/27/new-grad-vs-senior-dev/
by mumblemumble 6y ago
makes me think of https://ericlippert.com/2020/03/27/new-grad-vs-senior-dev/ https://ericlippert.com/2020/03/27/new-grad-vs-senior-dev/
- antisthenes 6y agoThat was a great read for someone who's used VBA to solve business cases, including InStr. Anecdata, but most of my strings were indeed short (searching for manufacturer SKUs inside arrays of other SKUs).
- mynegation 6y agoHa! Great story, thank you! Clearly shows that computational complexity by itself is not very useful without knowing the assumptions. It is one thing to see substring search and immediately pattern match it to something from CS course like Boyer-Moore or Knuth-Morris-Pratt, but these algorithms require pre-processing that makes sense only if you know you are going to search for the same pattern repeatedly. Pure library function cannot make that assumption, and REPNE instruction is just an icing on a cake.
- ghusbands 6y ago> pre-processing that makes sense only if you know you are going to search for the same pattern repeatedly The pre-processing is typically worth it if you're searching through a large string, even just once.
- monksy 6y agoThat was a great write up explaining about not seeing the forest for the trees. However, it is still infuriating that we're getting these leetcode questions in interviews to see how much you can hack and optimize a toy problem. (As if you had lots of time to think about it and work through it)