-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
I was poking at https://build.golang.org/, and I wondered why the builds for the riscv machines were lagging behind. I understand they may be slower machines, but still, they shouldn't be that slow.
I took a peek at some of the recent logs, such as:
https://build.golang.org/log/c0751a2f215266bf2e29d8987f7a274a4774894d
https://build.golang.org/log/f7b5e9a48eba8ab84a1ac5f77e87dec51f28ef3b
https://build.golang.org/log/ba7516c48279b409253d9742a2efb1fa2e2fa59d
What jumped out to me is how the bytes and strings packages take 100-300s to test, which sounds like something is very wrong. Perhaps they are running huge inputs through unoptimized functions like IndexByte? On most other builders, these packages take 1-2s.
For the rest of the packages, testing on riscv is somewhere in between about as fast and 10x slower. For example, cmd/go includes lots of process execution, filesystem I/O, and Go builds, and it goes from ~30s to ~300s, which is still reasonable. I haven't found a single other package that gets close to being 100x as slow.
Also, at an intuitive level, it does not make any sense that testing cmd/go takes about as long as testing bytes; the former has significantly more tests, even in short mode, and they tend to be integration tests too.
It's unclear to me if we can truly blame the two packages, or if this problem is only occurring on riscv; I haven't done further research.