The method
                        Use this prompt when you need to refactor code for performance or understand bottlenecks. Paste your code, specify the target language, and describe the performance issues you're facing. Refine with profiling requests for actionable insights. Ideal for complex algorithms.                    
                    The prompts
                                            Prompt 1
                                            
                                        
                                        Analyze the following Python code for performance bottlenecks. Identify areas for optimization, focusing on reducing time complexity and memory usage. Suggest specific code refactorings to improve the code's efficiency. Provide a brief explanation of why each suggested change will improve performance. Include any relevant Python profiling tools or techniques that could be used to further analyze and improve the code's performance. Finally, suggest a test case where performance is especially relevant.
```python
[PASTE YOUR CODE HERE]
```
                                    ```python
[PASTE YOUR CODE HERE]
```
                                            Prompt 2
                                            
                                        
                                        I have the following Java code which is running slowly: [PASTE CODE HERE]. It's particularly slow when handling large datasets. Can you suggest optimizations using the following strategies: (1) Reducing object creation, (2) Optimizing loops, and (3) Using appropriate data structures.  Also, how can I profile this code to pinpoint the exact lines that are causing the most performance degradation? Be specific with the tools and techniques I should employ. Give me concrete, runnable code examples when applicable.
                                    