3 ms·
I am not an academic. I have done this myself. Of course, we wrote a regex library... These tricks are in general something that it's well worth learning how t
by glangdale 9y ago
I am not an academic. I have done this myself. Of course, we wrote a regex library...
These tricks are in general something that it's well worth learning how to do if you do any performance critical code, as often the boundary of the way that they are implemented in someone's library is not useful for the actual task (i.e. you may have a fast 'find a space' function, but it might not be fast by the time you painfully iterate through each of its results removing spaces one by one). Sadly, a lot of this sort of processing doesn't compose very well unless you have access to an omniscient optimzer.
But yes, if this isn't your hot spot, don't do this thing in particular. It's still possible you might learn something useful by reading about it.