Compilation speed 0.16 became 2x slower (upd: it's not)

did anyone caught same behaviour?
our patch has 2k LoC diff, no dramatic build changes, but the difference in speed is huge.

in general we got a good test runner performance, but increased binary size (in Release it’s 2x) and x2 slower compilation speed.

release fast 0.15

real 0m41.832s
user 0m55.105s
sys 0m6.796s

releast fast 0.16

real 1m28.806s
user 1m21.891s
sys 0m4.542s

patch:

UPD:

the measurement were taken poorly, precise data is below, measured on 2cores azure vm:

bin size 0.16

app binary 17012168 - release fast
app binary 75186765 - debug

bin size 0.15

app binary 14080904 - release fast
app binary 66685304 - debug

compilation timing

release fast 0.15

real 1m26.376s
user 1m38.476s
sys 0m7.672s

releast fast 0.16

real 1m28.806s
user 1m21.891s
sys 0m4.542s

Since it correlates with an increase in binary size I would assume that this is caused by more code being emitted to LLVM. This can have multiple causes, and I’d suggest that you take a closer look at what’s inside the binary. Since I did not see an increase in my application, I suspect that some part of the standard library that you use got heavier to compile.

On Linux you can use nm --size-sort -r executable_name to print all the symbol names and types (only type t is relevant here) sorted by size, in there you can look for patterns (e.g. new entries at the top of the list, or large sets of continuous entries of comptime-duplicated functions) and compare it with the size on 0.15.

This should give you a hint of where in the standard library the size increase came from, and you may fix the issue by trying to avoid that part.

7 Likes

Missing an AI tag. Muting thread

2 Likes

appreciate your help.

found there are 2 things: build script and a dependency we use and the comp speed is measured badly.

TLDR compilation speed very little decrease (~2%), and bin size increase ~3mb, 1 of them comes from IO

The excessive size of Io is a well- known issue, and there are ideas/plans for addressing it.

2 Likes