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

It depends on what your primary goal is. If you want to write a program to do X, then you write a program to do X, and worry about performance later.

If you want to write a really fast parser, then you start out by thinking about the best optimizations that will give you a very fast parser.

To be fair, the author of this did write his library first without thinking too much about optimization, and then came back to make it faster. Unfortunately that sometimes means throwing away large pieces of code that just can't be made fast.

As with anything else, it's a balance. I think everyone should be writing code with performance in mind at least a bit. Just how much is dependent on the problem you're trying to solve and what your goals are.



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

Search: