docs(AGENTS): prefer Rrbvec over O(n²) List concat patterns - #61
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 582203f223
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - MUST NOT modify any dune file during development unless explicitly asked | ||
|
|
||
| See `.agents/skills/` for platform-specific development guides and `docs/agent-guide/` for design specifications. | ||
| - 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. |
There was a problem hiding this comment.
Remove
List.concat from the quadratic examples
List.concat traverses each input element once, so ordinary uses such as flattening a list of lists are O(total elements), not O(n²). Labeling it as inherently quadratic creates repository-wide guidance that may cause agents to replace a linear, idiomatic operation unnecessarily; narrow this rule to repeated append/concatenation patterns whose growing left operand actually causes quadratic work.
Useful? React with 👍 / 👎.
Summary
AGENTS.md: avoid O(n²)Listpatterns such asList.concatand repeatedList.appendon large sequences; when the project already depends on therrbvecpackage, useRrbvecvectors instead.Link to Devin session: https://app.devin.ai/sessions/cc13a6a77cdd40f89ea6695bff8ff7eb
Open in Devin Desktop: https://app.devin.ai/desktop/session/cc13a6a77cdd40f89ea6695bff8ff7eb?variant=devin
Requested by: @RCmerci