Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Python Lambda Performance Profiling (C-Extensions)
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[PYTHON_CODE] - ✦
[PROFILER_DATA] - ✦
[MATH_LIBRARIES]
python-lambda-c-extension-tuning.txt
Examine the [PYTHON_CODE] and [PROFILER_DATA] to find CPU-bound bottlenecks. Recommend replacing pure Python loops with [MATH_LIBRARIES] like NumPy or SciPy using Lambda Layers. Explain how to compile these C-extensions for the AWS Linux 2 runtime to maximize execution speed. Provide a benchmark comparison showing expected execution time reduction for data-intensive tasks.
Example Output
"The AI would identify slow 'for' loops and provide a vectorized NumPy alternative that executes 10x faster within the Lambda environment."