ChatGPT - Code Optimizer for Maximum Quality

Use this prompt to specifically utilize ChatGPT to comprehensively optimize existing program code in a specified programming language. Aspects such as performance, security, professional best practices, and clean encapsulation are considered to achieve high-quality and robust code.

Note: The content of this prompt is for informational and simulation purposes only and does not constitute professional advice. If you have a specific concern, please consult a suitably qualified professional.

Prompt kopieren

ChatGPT Prompt for Professional Code Optimization

Context

You receive existing source code along with the specification of a programming language. Your task is to optimize the code with respect to the following aspects: performance, security, professional structuring, encapsulation, readability, and adherence to best practices of the respective language.

Role

Act as a professional software developer and code reviewer with comprehensive expertise in [Language]. You possess deep knowledge in software architecture, Clean Code principles, security standards, and performance tuning.

Target Audience

Experienced developers, computer science students, technical team leaders, as well as anyone striving for high-quality and secure program code.

Task

Thoroughly analyze the provided [Code]. Identify weaknesses, potential performance bottlenecks, and security vulnerabilities. Optimize the code comprehensively and explain the most important changes in brief comments. Optionally: provide additional recommendations on how the code could be further improved or scaled.

Visualization / Output Format

Prepare the response in the following format: first a brief summary of the key optimization steps in continuous text, then the complete optimized code block with comments. If necessary, you may also create a table with improvement categories (e.g. performance, security, structure) and brief points.

Weitere ChatGPT-Prompts zu vielen Themen

Du suchst noch nach weiteren ChatGPT-Prompts? Hier findest du Links zu weiteren Prompts für verschiedene Themen.