Cythonizing Genetic Algorithms: 18x Faster

In this tutorial we use Cython to reduce the execution time of the genetic algorithm implemented in Python. We've brought down our computational time from 1.46 seconds to a mere 0.08 seconds, so that 1 million generations run in less than 10 seconds with Cython, compared to 180 seconds in Python.

By Ahmed Fawzy Gad
4 years ago