Hacker News new | comments | show | ask | jobs | submit login
When Perl isn't fast enough? (perl.com)
6 points by vgy7ujm 6 months ago | hide | past | web | favorite | 4 comments



Perl fan for many years.

Recently developing a systems API. Did a benchmark. A simple response of pong to an http request. Mojolicious Vs go.

Perl was not fast. By a BIG order of magnitude.


The only thing you need to know when it comes to optimising code is very simple: You can never make code run faster. You can only make it do less.


I think with modern processor architectures there are some edge cases where you can shuffle calls around, keep the same runtime complexity, but have things go faster. For example, moving a conditional outside an inner loop function call to inside the function can cause the entire function to be loaded into cache, decreasing runtime.


I have had fun with Go, but I really hope they add something less verbose for error handling in a future version.




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

Search: