Is there something wrong with this python code, why does it run so slow compared to ruby?

后端 未结 5 803
孤城傲影
孤城傲影 2021-01-13 07:54

I was interested in comparing ruby speed vs python so I took the simplest recursive calculation, namely print the fibonacci sequance.

This is the python code

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 08:32

    I was interested in comparing ruby speed vs python

    Microbenchmarks are a really bad way to compare languages, especially before you mastered both. If you want a benchmark that has any real world meaning then you need to put a lot of effort into it - or you google for "language shootout"

    Here is a better comparison of Python and Ruby

提交回复
热议问题