Software Development with GitHub Copilot
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp

Performance issues:
📈 Code looks correct, but doesn't scale
def find_common(list1, list2):
common = []
for item in list1:
for item2 in list2:
if item == item2:
common.append(item)
return common
❌ Brings down production on a busy day
[screencast]
[screencast]

Targeted optimization
Optimize
#selectionfor performance and reduce time complexity
Review
#selectionfor memory leaks
Codebase-wide scan
@workspacefind functions with nested loops over large collections
[screencast]
[screencast]
.github/copilot-instructions.md
## Performance standards
- Prefer set or dict lookups over nested loops
- Use context managers for files, connections, and sockets
- Avoid loading entire datasets into memory, use generators or streaming
✅ Prevents performance bottlenecks from being written in the code
Software Development with GitHub Copilot