There is a post comparing the efficiency of asp and python, I can’t help but test it

Original post: https://zhuanlan.zhihu.com/p/32861669

https://bbs.csdn.net/topics/370015685

# Remarks: Although comparing the efficiency of the two languages ​​should not be so simple and rude, I still have to look at this scenario, is python really much worse than asp? Ha ha

Self-test:

#!/usr/bin/env python
#-*- coding = utf-8 -*-

from time import *
begin_time = time()
i=0
while i<10000:
    #if i > 9990:
    print(i)
    i+=1

end_time = time()
run_time = end_time-begin_time
print (run_time)

The results are as follows:

。。。

9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
0.0283498764038
 

the second time:

。。。

9993
9994
9995
9996
9997
9998
9999
0.0360898971558

 

This asp buddy has a bubble in his head. .

Guess you like

Origin blog.csdn.net/yuezhilangniao/article/details/112534645