Repository navigation
Conversation
The runtime answers like libuv 1.51's uv_available_parallelism, which Node's os.availableParallelism() returns: on Linux the CPUs in the process's affinity mask, lowered to a smaller cgroup (v2 cpu.max or v1 CFS) CPU quota; on Darwin hw.activecpu, hw.logicalcpu or hw.ncpu; on Windows GetSystemInfo's processor count; at least 1. WASI answers 1, as the dynamic island does. Parallel programs (tsc-ts --checkers) need it to size their thread pools. Corpus 4598 pins the value against the host's Node.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Comment on lines
+1540
to
+1541
| sscanf(value, "%lld %lld", &limit, &period) == 2 && period != 0) | ||
| *quota = limit / period; |
Contributor
cramforce
force-pushed
the
perf/alloc-hugepages
branch
from
October 11, 2026 03:40
3afea88 to
9cdaa5b
Compare
cramforce
force-pushed
the
perf/parmem
branch
from
October 11, 2026 03:40
4b32515 to
9b923f5
Compare
cramforce
force-pushed
the
perf/alloc-hugepages
branch
from
October 11, 2026 03:44
9cdaa5b to
3afea88
Compare
cramforce
force-pushed
the
perf/parmem
branch
from
October 11, 2026 03:45
9b923f5 to
4b32515
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
os.availableParallelism()to static-native programs, matching Node/libuv: the CPU affinity mask, reduced by the cgroup CPU quota on Linux, and the logical CPU count elsewhere. Verified against Node on macOS and on Linux under affinity 0-7, 0-31 and 3. tsc-ts uses it to size its parse threads and pick a default checker count (TSC_TS_CHECKERS=auto). New corpus program4598-os-available-parallelism; Node compatibility manifests regenerated. Stacked on #830.