comparing python with c/fortran

后端 未结 8 1994
深忆病人
深忆病人 2021-02-04 10:15

I wrote the following programs to compare the speed of python with c/fortran. To get the time used by the programs I used the \"time\" command. All the programs compute the sq

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 10:29

    probably you can. There are a number of math libraries for python which probably can do the task you want quite a bit more efficient. Since the python ranges work quite different than c loops, I would try to unroll these loops first.

提交回复
热议问题