|
|
|
|
|
by badgar
4882 days ago
|
|
> Treat input handling computational power as a privilege, and reduce it whenever possible. A great example of this was Google's Code Search product, before it was canceled. Since full backtracking search was blowing out the tiny thread stacks in servers, they had to reduce what they allowed to actually regular expressions - expressions generating a regular language. Queries could be turned into DFAs of linear size with respect to input, making arbitrary public regex searches over code indices feasible. Ross Cox's regular expressions write-ups are quite a fascinating deep-dive: http://swtch.com/~rsc/regexp/ |
|