HOPE - combine the ease of Python and the speed of C++

HOPE is a specialized method-at-a-time JIT compiler written in Python for translating Python source code into C++ and compiles this at runtime. In contrast to other existing JIT compliers, which are designed for general purpose, we have focused our development of the subset of the Python language that is most relevant for astrophysical calculations. By concentrating on this subset, HOPE is able to achieve the highest possible performance.

By using HOPE, the user can benefit from being able to write common numerical code in Python and having the performance of compiled implementation. To enable the HOPE JIT compilation, the user needs to add a decorator to the function definition. The package does not require additional information, which ensures that HOPE is as non-intrusive as possible:

The HOPE package has been developed at ETH Zurich in the Software Lab of the Cosmology Research Group and is now publicly available at external pageGitHub. Further information on the package can be found in our external pagepaper on external pagepytonhosted.org

Distribution

The package has been uploaded to external pagePyPI and can be installed at the command line via pip:

The development is coordinated on external pageGitHub and contributions are welcome.

Benchmarks

All the benchmarks have been made available online as IPython notebooks. If you would like to run the benchmarks on your machine, you can download the notebooks in the nbviewer. Note: Make sure to execute the native_cpp_gen the first time in order to generate the native C++ code and some Python utility modules.

Feedback

If you have any suggestions or questions about HOPE feel free to us.

If you encounter any errors or problems with HOPE, please let me know!

© Copyright 2014, ETH Zurich, Cosmology Research Group.

external pageSphinx theme based on external pageRead the Docs customized by J. Akeret, L. Gamper

 

 

JavaScript has been disabled in your browser