3 ms·
- Use better data structures that map well to the problem you're solving. - Use caching. - Use an actual database, if you aren't already. - If you're CPU-bound,
by gcr 12y ago
- Use better data structures that map well to the problem you're solving.
- Use caching.
- Use an actual database, if you aren't already.
- If you're CPU-bound, rewrite it in a faster language. If you need speed, C or Java is the only way to get it. Javascript is also surprisingly fast. Even Python is a factor of ~ 2 faster than Ruby.