Skip to content

Conversation

@SheatNoisette
Copy link
Contributor

Instead of compiling sequentially the programs, attempt to build them in parallel to speed up the compilation.

$ time v run build.vsh --cpus=4
Using 4 parallel jobs
compiling [                   ... took 691ms .
compiling arch                ... took 757ms .
[...]
compiling whoami              ... took 697ms .
compiling yes                 ... took 673ms .
> Compiled:  72 tools in 15321ms. Already compiled and skipped: 0 . All folders: 109 .
v run build.vsh --cpus=4  58.04s user 8.02s system 410% cpu 16.079 total
$ time v run build.vsh --cpus=1
Using 1 parallel jobs
compiling [                   ... took 454ms .
compiling arch                ... took 547ms .
compiling whoami              ... took 490ms .
compiling yes                 ... took 495ms .
> Compiled:  72 tools in 38784ms. Already compiled and skipped: 0 . All folders: 109 .
v run build.vsh --cpus=1  39.42s user 5.62s system 113% cpu 39.544 total

@JalonSolov
Copy link
Contributor

Needs v fmt on build.vsh

@SheatNoisette
Copy link
Contributor Author

@JalonSolov Done

@JalonSolov
Copy link
Contributor

The CI errors are unrelated to this change.

@JalonSolov JalonSolov merged commit 7c34eab into vlang:main Dec 21, 2025
0 of 4 checks passed
@SheatNoisette SheatNoisette deleted the parallel_building branch December 21, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants