Go Compiler's Use of Parallelism?

15 views
Skip to first unread message

jlfo...@berkeley.edu

unread,
Dec 16, 2025, 9:11:20 PM (5 hours ago) Dec 16
to golang-nuts
How much faster does the go compiler run when presented with additional cores?

For example, let's say you boot Linux telling it you have just one processor. You build the Go compiler.

You then repeat this process for a number of times equal to the number of processors you have in your system, each time increasing the number of processors you tell Linux to use by one. How is the speed of compilation affected by the number of processors? Is there a point when adding more processors does no good?

Cordially,
Jon Forrest

Robert Engels

unread,
Dec 16, 2025, 9:39:45 PM (5 hours ago) Dec 16
to jlfo...@berkeley.edu, golang-nuts

You can test this yourself easily. Just use cpuctrl or cpu sets - you don’t need to reboot. I think Go compiles using Go so you can probably just set max procs. https://go.dev/blog/container-aware-gomaxprocs

On Dec 16, 2025, at 8:11 PM, 'jlfo...@berkeley.edu' via golang-nuts <golan...@googlegroups.com> wrote:


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/123fcf04-b6ee-4b34-bc4f-e7dc46947672n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages