GitHub Copilot を使ったソフトウェア開発
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp

パフォーマンス問題の特徴:
📈 コードは正常に見えるが、スケールしない
def find_common(list1, list2):
common = []
for item in list1:
for item2 in list2:
if item == item2:
common.append(item)
return common
❌ 繁忙時に本番環境をダウンさせる
[screencast]
[screencast]

ターゲット最適化
#selectionのパフォーマンスを最適化し、時間計算量を削減する
#selectionのメモリリークを調査する
コードベース全体のスキャン
@workspace大規模コレクションでネストされたループを持つ関数を検索する
[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
✅ コードにパフォーマンスのボトルネックが生まれるのを防ぐ
GitHub Copilot を使ったソフトウェア開発