Giter Site home page Giter Site logo

aws-samples / jsii-python-benchmarking Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 7 KB

Code samples that accompany the AWS blog post on jsii

Home Page: https://aws.amazon.com/blogs/opensource/generate-python-java-dotnet-software-libraries-from-typescript-source/

License: MIT No Attribution

Python 100.00%
jsii python benchmarking

jsii-python-benchmarking's Introduction

jsii-python-benchmarking

Benchmark jsii Python module vs native counterpart

Benchmark native Python

  1. run cd native-python
  2. run pip install -r requirements.txt
  3. run python -m timeit "import benchmark; benchmark.my_function()"

native module timeit results:

  1. From an AWS Workspaces VM with 4 Cores and 8 GiB RAM running Windows 10 (and Ubuntu 19.10 WSL).
2000 loops, best of 5: 117 usec per loop
  1. From a 2019 MacBook Pro with 2.8 GHz Intel Core i7 and 16GiB RAM running macOS Mojave.
5000 loops, best of 5: 69.4 usec per loop

Benchmark jsii Python

  1. run cd jsii-python
  2. run pip install -r requirements.txt
  3. run python -m timeit "import benchmark; benchmark.my_function()"

jsii module timeit results:

  1. From an AWS Workspaces VM with 4 Cores and 8 GiB RAM running Windows 10 (and Ubuntu 19.10 WSL).
1 loop, best of 5: 14 msec per loop
  1. From a 2019 MacBook Pro with 2.8 GHz Intel Core i7 and 16GiB RAM running macOS Mojave.
50 loops, best of 5: 6.7 msec per loop

P.S.: Thanks to this detailed article for the help with benchmarking Python code

License

This library is licensed under the MIT-0 License. See the LICENSE file.

jsii-python-benchmarking's People

Contributors

amazon-auto avatar floydpink avatar

Watchers

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