I wondered if Python 3.4 was faster, but it was slower

I felt that it was faster when I changed the Python installed in Windows 7 at work to 3.4.0, but that was the reason. I'm sorry if I couldn't test the execution time.

C:\pyworks>C:\Python34\python.exe -m runtime_test
1401870117.465672
1401870127.773703
Runtime is 10.308

C:\pyworks>C:\Python33\python.exe -m runtime_test
1401870129.476873
1401870139.385864
Runtime is 9.909

C:\pyworks>py -m runtime_test
1401870167.25
1401870175.41
Runtime is 8.167
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
     import time
     time1 = time.time()
     print(time1)
     process()
     time2 = time.time()
     print(time2)
     time = float(time2 - time1)
     print("Runtime is {0:.3f}".format(time))

def process():
     for d in range(1000):
          x = sum(i for i in range(100000))

if __name__ == '__main__':
     main()

Recommended Posts

I wondered if Python 3.4 was faster, but it was slower
If it was Ruby
I was able to repeat it in Python: lambda
A story that I wondered if it stopped working at mglearn.plots.plot_nmf_faces and was an error?
I started, but it doesn't start!
If I thought I didn't see the pyc file recently, it was quarantined in pycache by python3.
I wondered if it became so easy when it became centos8 2 ~ I tried adding PHP ~
I want to do it with Python lambda Django, but I will stop
I want to tweet on Twitter with Python, but I'm addicted to it
When I tried to run Python, it was skipped to the Microsoft Store
Use Python from Java with Jython. I was also addicted to it.
Even if I uploaded HTML with boto3, it was not recognized as HTML
Wrangle x Python book I tried it [2]
Check if it was run as root
Wrangle x Python book I tried it [1]
What I was addicted to Python autorun
CheckIO (Python)> Non-unique Elements> I implemented it
The file edited with vim was readonly but I want to save it
I tried using Google Translate from Python and it was just too easy
[Python] None I made nullutil.py because it was cluttered by checking and branching.
[Python] I introduced Word2Vec and played with it.
[Introduction to json] No, I was addicted to it. .. .. ♬
I was able to recurse in Python: lambda
When I try matplotlib in Python, it says'cairo.Context'
python memo-"if not A and B" was "if (not A) and B"
Create Python folder Check if it already exists
Two things I was happy about with Python 3.9
[Memorandum] python + vscode + pipenv It's common, but it was a mess with warning, so a memorandum