Skip to main content

Python Code Optimization using compilation flags

Project description

PyCoptimizer

This framework is made to offer, to the user, simplicity to choose what flags can be used for optimization in compilation time. It provides to you a list with compilation flags that can be used in compilation to find your goal: maximize ou minimize some of your numbers, like throughput or execution time. The idea started in a project on CERN, where I ran a genetic algorithm with a list of compilation flags to select the flags that improve the target code throughput.

In this framework, you can define your target code to be improved, define what you want improve (maximize throughput, minimize the execution time or minimize memory usage) with what compilation flags (this list can be made by you or you can use the framework default list) and which technique you want to use. You just need to implement an abstract class, defined by the framework and the parameters to be used.

Installation

Dependencies

PyCoptimizer requires:

  • Python (>= 2.7.10)
  • Matplotlib (>= 2.0.2)
  • NumPy (>= 1.13.3)
  • Pygmo (>= 2.11)

For Pygmo package, you can follow the instructions to install in the official website: Installation Guide.

User installation

If you already have a working installation of numpy, matplotlib and pygmo, the easiest way to install pycoptimizer is using pip

pip install PyCoptimizer

How to use

You can see how to use PyCoptimizer into the examples folder in any file with test in the name.

Source code

You can check the latest sources with the command:

git clone https://github.com/lefreire/tcc.git

Contact

You can contact me for any problem in:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyCoptimizer-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file PyCoptimizer-0.1.2.tar.gz.

File metadata

  • Download URL: PyCoptimizer-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.5

File hashes

Hashes for PyCoptimizer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 86e704fad0dad502c4bd05e95836c07837d6401c58f90b2de17ce471b5012f15
MD5 5a4f741f681e493ff3b9c8f112e6fc36
BLAKE2b-256 bd8f8ac3d8d64e907b95a5e3d4368dcd7c4b325d6fc2df4f1093b02c67c7eb13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page