Re:Recursive fibonacci benchmark using top languages on GitHub
by firic on Friday September 28, 2018 @09:23AM
(#18093080)
Why is python 2.7 faster than 3? I thought one of the big reasons to switch to 3 was because of performance
[ Parent
| on HN ]
Re:Recursive fibonacci benchmark using top languages on GitHub
by kec on Friday September 28, 2018 @11:55AM
(#18094410)
Where did you hear that? 3 hasn’t even been competitive vs 2 until very recently.
Reasons for the switch have always been better Unicode handling and not being left behind as the community matches on (and soon lack of security updates to 2).
Re:Recursive fibonacci benchmark using top languages on GitHub
by syockit on Friday September 28, 2018 @10:49AM
(#18093823)
Something to do with python 3 using long† integer as the default int, which can be arbitrarily long, so it may have slower arithmetics.
† not to be confused with the typical C long int type.