Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Medium impact] This PR appears safe to merge.
|
findAllandfindOnecalledunshiftandshifton two stacks to walk the tree. This change keeps the current array and index in local variables. It usespushandpoponly when the walk goes into a child array or comes back from it. The visit order and the results do not change.distbuild, ns/op:selectAll("div")on a page with 2,083 elementsselectAll("ul > li > a")on the same pageselectOnewith no match on 4,000 elementstest/fixtures/sizzle.htmlI measured no slowdown on 33 benchmarks. These include text-heavy documents,
<template>content, XML mode, a tiny document, andselectOnewith an early match. I used 12 interleaved rounds and a Mann-Whitney test (Apple M2 Max, Node 24.15.0).Checks:
npm testpasses.selectAll,selectOne,is, andcompile. The cases use random documents, options, and adapters withoutprevElementSibling. The selectors are random, or they come from the 1,127 selector strings intest/.Summary by CodeRabbit