Creating an AI-powered tool to analyze code snippets for performance bottlenecks and provide optimization suggestions is a multi-faceted project. Below, I will outline a high-level plan for building this tool, including the necessary components, design choices, and a sample README file. However, please note that I cannot create a GitHub repository or upload files directly. Instead, I will guide you through the process.
Project Structure-
Frontend: A simple web interface for users to upload code snippets.
Backend: A server that processes the code snippets, analyzes them for performance issues, and returns suggestions.
Analysis Engine: A module that uses static analysis techniques to identify bottlenecks and suggest optimizations.
Technology Stack-
Frontend: HTML, CSS, JavaScript (React or Vanilla JS)
Backend: Python (Flask or FastAPI)
Analysis Engine: Python (using libraries like ast for static analysis)
Design Choices-
Frontend: A simple HTML form was chosen for ease of use.
Backend: Flask was selected for its simplicity and ease of integration with Python.
Analysis: A basic static analysis using Python's ast module was implemented for