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

This is a pretty terrible implementation of fib(n).


It's a common approach to measuring function spawn cost.


Maybe, but it's also why synthetic benchmarks are not convincing. Maybe node better handles a bad pattern, but if performance is a concern to this level we're more concerned about functionally equivalent good patterns even if the code is very different.


I think GP meant how the fib function was written (and not why it was chosen for the measurement). The `if n == 1 or n == 0` thing hurts my eyes too.


Regardless node IS definitively one of the fastest interpreted platforms around. It is well known that it is faster than python. Python wins in other areas, including being a much much better designed language.


Probably comes from V8 (JS engine in node), likely being the most heavily optimized language runtime engine ever made.


Agreed. They have some of the smartest people working on that.


Yeah, it's definitely because of that.




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

Search: