Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
## 2025-05-20 - Pre-compiling Regex in Loops
**Learning:** `re.findall(pattern, string)` recompiles (or retrieves from cache) the pattern on every call. In high-frequency functions called inside loops (like complexity estimation), this overhead adds up.
**Action:** Always pre-compile regexes (`re.compile`) into module-level or class-level constants if they are used repeatedly, especially in tight loops or recursive functions.

## $(date +%Y-%m-%d) - O(N*M) nested loops into O(N) pre-computed lookups
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El encabezado usa el literal $(date +%Y-%m-%d), que parece un placeholder de shell y no una fecha real. Para que el log sea estable y legible en el repo, reemplazarlo por una fecha concreta (p. ej. 2026-04-27) o por un texto neutral sin sustitución de comandos.

Suggested change
## $(date +%Y-%m-%d) - O(N*M) nested loops into O(N) pre-computed lookups
## 2026-04-27 - O(N*M) nested loops into O(N) pre-computed lookups

Copilot uses AI. Check for mistakes.
**Learning:** Found O(N*M) loop performance bottlenecks in `evolutia/material_extractor.py` and `evolutia/rag/rag_indexer.py`. The nested loops were matching solutions to exercises.
**Action:** Replace the nested loop that pairs exercises with solutions with an O(N) pre-computed dictionary that indexes solutions by `exercise_label`.
Loading