Repository navigation
Conversation
|
@codex review |
Changelog💅 Polish
Semantic Diff1 commit · Full page Key a build file by its own path when it is already normal51d5190 · JonoPrest · Nov 09, 2026, 14:38 UTC
Measured with scripts/compilerBenchmarks.js against the previous commit: allocated words -2.27% in the builds of tests/tests (build/clean -2.48%), -0.78% in the generated projects, the files compiled one by one unchanged (the store is only used in a build). On a 552 module React app (clean build) the build allocates 2.47% fewer words at one domain. Its user time is 1.2% lower at one domain (40 alternating pairs, 95% CI 0.5% to 2.1%) and 2.0% lower at the default domains (15 pairs, 1.0% to 2.8%); its wall time is unchanged within the noise. Review
|
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. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🎉 Compiler benchmarksAllocated wordsIn total: 683,552,746 → 679,251,058 (-0.63%). 🎉 Improvement: 2 benchmarks allocate more than 1% less.
InstructionsIn total: 9,664,672,297 → 9,664,675,329 (±0.00%). None of the 33 benchmarks changed by 0.1% or more. Output sizeIn total: 25,569,598 → 25,569,587 (±0.00%). None of the 13 benchmarks changed by 0.1% or more. Pull request 51d5190 compared with base b82d944 in this run. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9285 +/- ##
==========================================
+ Coverage 81.92% 81.93% +0.01%
==========================================
Files 456 456
Lines 65464 65522 +58
==========================================
+ Hits 53631 53687 +56
- Misses 11833 11835 +2
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9285 |
c1b4ff3 to
51d5190
Compare
Why:
`Build_file_store.key` split every path into segments and joined them
again, also when no segment was `.`, `..` or empty and the result was
the path itself. The store keys every read, so a request that looks
up an interface along the load path built a list and a new string for
each directory it tried, about 200 words a lookup.
`key` now first checks, without allocating, that the path has no `.`,
`..` or empty segment (other than the leading one of an absolute path)
and no separator other than `/`, and then returns the path itself. Other
paths are normalized as before, so every spelling of a file keeps the
same entry.
`key` is now in the interface, so that a test can compare it with a copy
of the previous normalization: on edge cases (`//`, trailing `/`, `.`
and `..` anywhere, `...` and `.a` names, the empty path, backslashes,
drive letters, UNC paths), on every path of up to 8 characters made of
`/`, `.`, `\` and `a`, and on 20,000 seeded random paths. The copy reads
`Sys.win32` like `key`, so the test holds on Windows too.
Measured with scripts/compilerBenchmarks.js against the previous commit:
allocated words -2.27% in the builds of tests/tests (build/clean
-2.48%), -0.78% in the generated projects, the files compiled one by one
unchanged (the store is only used in a build). On a 552 module React app
(clean build) the build allocates 2.47% fewer words at one domain. Its
user time is 1.2% lower at one domain (40 alternating pairs, 95% CI 0.5%
to 2.1%) and 2.0% lower at the default domains (15 pairs, 1.0% to 2.8%);
its wall time is unchanged within the noise.
Review: Can a key change? No: a path that passes the check splits into
segments that the normalization keeps in order, so joining them gives
the path back; any other path takes the previous code.
Review: What about Windows? There `\` is also a separator, and a path
with one takes the previous code; a path with only `/` separators,
such as `C:/a/b`, is split the same way on both platforms.
Signed-off-by: Jono Prest <[email protected]>
51d5190 to
dc61691
Compare
Changelog💅 Polish
Semantic Diff1 commit · Full page Key a build file by its own path when it is already normaldc61691 · JonoPrest · Nov 09, 2026, 14:38 UTC
Measured with scripts/compilerBenchmarks.js against the previous commit: allocated words -2.27% in the builds of tests/tests (build/clean -2.48%), -0.78% in the generated projects, the files compiled one by one unchanged (the store is only used in a build). On a 552 module React app (clean build) the build allocates 2.47% fewer words at one domain. Its user time is 1.2% lower at one domain (40 alternating pairs, 95% CI 0.5% to 2.1%) and 2.0% lower at the default domains (15 pairs, 1.0% to 2.8%); its wall time is unchanged within the noise. Review
|
🎉 Compiler benchmarksAllocated wordsIn total: 683,552,616 → 679,250,674 (-0.63%). 🎉 Improvement: 2 benchmarks allocate more than 1% less.
InstructionsIn total: 9,664,672,297 → 9,664,675,329 (±0.00%). None of the 33 benchmarks changed by 0.1% or more. Output sizeIn total: 25,569,598 → 25,569,587 (±0.00%). None of the 13 benchmarks changed by 0.1% or more. Pull request dc61691 compared with base 70da3d1 in this run. |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9285 |
Build_file_store.keynormalized every path by splitting it into segments and joining them again, about 200 allocated words per call, although nearly every path the build looks up is already normal. A clean build of a 552-module React app calls it about 99k times.keynow checks, without allocating, whether the path has no.,..or empty segment and (on Windows) no backslash, and then returns it as is; other paths are normalized exactly as before.keyis exposed so that a new ounit test can compare it with a copy of the previous normalization on edge cases (//, trailing/, dot segments anywhere,.../.anames, the empty path, backslashes, drive letters, UNC paths), on every path of up to 8 characters over/ . \ a, and on 20,000 seeded random paths.compilerBenchmarks.js)build/cleanBuild outputs (JS,
.cmi,.cmj,.ast) are byte-identical on three real-world projects and their dependencies at default and one domain.Checklist
changes/README.md), or no release notes are needed and a maintainer should applychangelog:skip.CONTRIBUTING.md).git commit -s).