comparing python with c/fortran

后端 未结 8 2196
深忆病人
深忆病人 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:43

    You have not explained exactly what the goal of your measurement is, so it is very hard to answer whether or not your test code is going to adequately provide you with information to satisfy that goal. In general, benchmarks exist to tell you something very specific -- you should know exactly what you're trying to figure out by conducting the benchmark. Microbenchmarks, of the type you're trying above, are also notorious for providing distorted answers...

提交回复
热议问题