Giter Site home page Giter Site logo

wrightrocket / python3.5_coro_testing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sonictherocketman/python3.5_coro_testing

0.0 2.0 0.0 60 KB

A little suite of tests for gauging the speed of various Python concurrency methods.

Python 97.41% Shell 2.59%

python3.5_coro_testing's Introduction

Testing Python 3.5's various concurrency methods

A little suite of tests for gauging the speed of various Python concurrency methods.

This suite tests:

  • CPU Bound operations
  • I/O Bound operations
  • A mix of CPU and I/O operations

Each of the tests contains 5 parts:

  • Sequential execution (for comparison).
  • Multiprocessing pool execution (classical Python multiprocessing)
  • Multithreading pool execution (classical Python threading)
  • Python 3.5 async Coroutines (using a multiprocessing pool)
  • Python 3.5 async Coroutines (using a threading pool)

Each of the 3 test types should be taken seperately as they contain different computations.

Test it yourself

git clone https://github.com/Sonictherocketman/python3.5_coro_testing
cd python3.5_coro_testing
bash run.sh

Sample Results

Retina Macbook Pro (2014, 13")

<tr>
    <td>I/O Bound</td>
    <td>Serial</td>
    <td>1.924s</td>
</tr>
<tr>
    <td></td>
    <td>Coro Multi</td>
    <td>0.951s</td>
</tr>
    <td></td>
    <td>Coro Thread</td>
    <td>1.97s</td>
</tr>
<tr>
    <td></td>
    <td>Multiprocess</td>
    <td>1.320s</td>
</tr>
<tr>
    <td></td>
    <td>Threading</td>
    <td>1.807s</td>
</tr>

<tr>
    <td>Mixed I/O and CPU</td>
    <td>Serial</td>
    <td>4.789s</td>
</tr>
<tr>
    <td></td>
    <td>Coro Multi</td>
    <td>13.574s</td>
</tr>
    <td></td>
    <td>Coro Thread</td>
    <td>7.724s</td>
</tr>
<tr>
    <td></td>
    <td>Multiprocess</td>
    <td>4.513s</td>
</tr>
<tr>
    <td></td>
    <td>Threading</td>
    <td>4.976s</td>
</tr>
Type Test Time
CPU Bound Serial 7.804
Coro Multi 4.739s
Coro Thread 8.221s
Multiprocess 4.488s
Threading 8.251s

python3.5_coro_testing's People

Contributors

sonictherocketman avatar

Watchers

WrightRocket avatar  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.