Giter Site home page Giter Site logo

sjev / python3.11_speedtest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dennisbakhuis/python3.11_speedtest

0.0 0.0 0.0 1.74 MB

Simple speed tests for Python 3.11

License: MIT License

C++ 1.03% Python 3.50% Rust 0.36% Julia 0.29% Jupyter Notebook 93.97% Shell 0.17% Cython 0.35% Go 0.33%

python3.11_speedtest's Introduction

Speed test for Python 3.11

I created a simple speed test to compare Python 3.11 to 3.10 (and 3.9 .. 3.5). The tests use a Monte Carlo Pi estimation. This is probably not the best workload for a full Python stress test.

Dennis Bakhuis - 8th September 2022

Blog post

This is the code which belongs to a blog post you can find here.

Additional contributions:

Calculated results by continuous integration

You can see the latest results in Github Actions for different languages as well as different versions of Python. The results are collected in a JSON artifact. Below is an example output:

{
    "Julia": 0.0448,
    "Go": 0.0774,
    "Numba": 0.1626,
    "Rust": 0.1755,
    "Cpp": 0.2071,
    "Cython": 0.2703,
    "C": 0.4208,
    "Python_3.11": 12.1766,
    "Python_3.9": 14.1459,
    "Python_3.10": 14.3943,
    "Python_3.7": 16.0291,
    "Python_3.8": 18.6563
}

Run original test using Docker

Requirements

  • Python environment to run the tester
  • Docker to download each Python Env.

Usage:

cd pi_estimates/Python
python run_main_test.py

Original results

The new Python 3.11 took 6.4605 seconds per run.

Python 3.5 took 11.3014 seconds per run.(Python 3.11 is 74.9% faster)
Python 3.6 took 11.4332 seconds per run.(Python 3.11 is 77.0% faster)
Python 3.7 took 10.7465 seconds per run.(Python 3.11 is 66.3% faster)
Python 3.8 took 10.6904 seconds per run.(Python 3.11 is 65.5% faster)
Python 3.9 took 10.9537 seconds per run.(Python 3.11 is 69.5% faster)
Python 3.10 took 8.8467 seconds per run.(Python 3.11 is 36.9% faster)

python3.11_speedtest's People

Contributors

dennisbakhuis avatar greg-hellings avatar jszitas avatar luander avatar panxiaoguang avatar sjev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.