Skip to content
Closed
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
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AGENTS

- Avoid O(n²) `List` patterns such as `List.concat` and repeated `List.append` on large sequences; when the project already depends on the `rrbvec` package, use `Rrbvec` vectors instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop classifying every List.concat call as quadratic

List.concat traverses each inner list once, so its complexity is linear in the total number of elements; unlike repeatedly appending an ever-growing prefix, it is not inherently O(n²). As written, this repository-wide rule can make agents replace valid linear-time code with an unnecessary vector representation, so narrow it to genuinely quadratic accumulation patterns instead.

AGENTS.md reference: AGENTS.md:L3-L3

Useful? React with 👍 / 👎.

Loading