Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Altough performance isn't really part of this exercise, beautiful code is also likely to be fast -- efficiently doing the work to solve the problem and no more.


Not always true, e.g. brute force searching can often look more beautiful than more sophisticated techniques. The article mentions how performance could be improved by separating compilation and execution of the regular expression (as most "real" regex libraries do) - but this would almost certainly make it less beautiful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: