Investigate the stable C-Python API
https://docs.python.org/3/c-api/stable.html
Rational: build once and deploy on any version of python (within a certain range).
--> likely to save a lot of energy & time in recompilation of pyFAI during continuous integration process (also with BoB).
some more reading: https://github.com/cython/cython/issues/2542
even more: https://peps.python.org/pep-0652/
TODO: Measure the amount of energy needed to build pyFAI using setuptools and meson:
- setuptool t = XX s, E= XX J
- meson t = XX s, E= XX J
Reference computer:
Also check the speed of most extensions since this path is likely to show slow-down in the order of 10%
Computer: macbook13 late2013 running on battery
sudo perf stat -e power/energy-cores/,power/energy-ram/,power/energy-gpu/,power/energy-pkg/ /home/kieffer/.venv/py311/bin/python -m build -n
Performance counter stats for 'system wide':
4,107.37 Joules power/energy-cores/
502.41 Joules power/energy-ram/
22.44 Joules power/energy-gpu/
5,097.11 Joules power/energy-pkg/
205.446454898 seconds time elapsed
Using the former build tool:
sudo perf stat -e power/energy-cores/,power/energy-ram/,power/energy-gpu/,power/energy-pkg/ /home/kieffer/.venv/py311/bin/python setup.py bdist_wheel
Performance counter stats for 'system wide':
5,275.53 Joules power/energy-cores/
766.19 Joules power/energy-ram/
63.12 Joules power/energy-gpu/
7,395.96 Joules power/energy-pkg/
432.963893802 seconds time elapsed
Computer: Epyc 7262 (8 core) meson:
Performance counter stats for 'system wide':
3 510,61 Joules power/energy-pkg/
43,107392225 seconds time elapsed
setup.py:
Performance counter stats for 'system wide':
19 852,24 Joules power/energy-pkg/
359,812061364 seconds time elapsed