Is it possible to use JIT complier like numba to accelerate python bot?


I would like to know if it is allowed/possible to accelerate a python program for Halite 3 by JIT compiling it into C++. I have several years developing experiences on Python (mainly for machine learning and deep learning) and learned C++ by myself. I’m not sure if using a JIT compiler for Halite is just as easy as importing some modules on top of the file or is actually impossible.

The reason I am considering JIT compiler is that apparently there are many graph theory algorithms and machine learnings algorithm that I think we can try for Halite 3. I’m pretty worried that Python’s efficiency will, in the end, become a bottleneck for further performance improvement. Instead of switching to C++, I would like to know if I can hack this problem with a JIT compiler? Besides my concern for execution efficiency, I also feel much more comfortable to develop machine learning algorithm with Python library instead of C++ library.

So what’s your opinion? Any comment will be appreciated.


OK I just checked the Halite server it seems that PyPy is one of the native option.