Writing C in Cython

Cython implementation for comparison: import random from cymem.cymem cimport Pool from libc.math cimport sqrt cimport…