eggplantbren / DNest4

Diffusive Nested Sampling
MIT License
60 stars 21 forks source link

Faster python #28

Closed SpaceOdyssey closed 6 years ago

SpaceOdyssey commented 6 years ago

Two updates:

  1. Compiled class in python/examples/straightline/straightline.py with Numba using jitclass. The dummy variable in the decorator is required due to the jitclass syntax. This reads much better than the version I sent you. I lost ~10-20 seconds but the readibility is significantly better.

  2. Cythonised python/dnest4/utils.py. I also updated python/setup.py so that it is automatically loaded for anyone. It may be better to wrap RNG.cpp in the C++ version, however.

eggplantbren commented 6 years ago

Merged. I'll do the same numba stuff to gaussian.py as well.