{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"# Python performance tips and best practice for CLIMADA developers\n",
"\n",
"This guide covers the following recommendations:\n",
"\n",
"⏲️ **Use profiling tools** to find and assess performance bottlenecks.
\n",
"🔁 **Replace for-loops** by built-in functions and efficient external implementations.
\n",
"📝 **Consider algorithmic performance**, not only implementation performance.
\n",
"🧊 **Get familiar with NumPy:** vectorized functions, slicing, masks and broadcasting.
\n",
"⚫ **Miscellaneous:** sparse arrays, Numba, parallelization, huge files (xarray), memory.
\n",
"⚠️ **Don't over-optimize** at the expense of readability and usability."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "skip"
},
"toc": true
},
"source": [
"