190. Cython for Performance
# Cython file (example1.pyx)
def add(int a, int b):
return a + bfrom setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize("example1.pyx")
)python setup.py build_ext --inplacefrom example1 import add
print(add(10, 20)) # Output: 30Last updated