diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-04-25 15:37:56 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-04-25 15:37:56 -0400 |
| commit | 8614397110595e267b7e4e1f558bfce619e60c02 (patch) | |
| tree | 70cb89a4692f268ad17b8869be41e09149b63e39 /src/link.cpp | |
| parent | efa771af754281cd76a77ef22af107eb0a9aaf9a (diff) | |
| download | zig-8614397110595e267b7e4e1f558bfce619e60c02.tar.gz zig-8614397110595e267b7e4e1f558bfce619e60c02.zip | |
compile time improvement - move overflow math safety to fns
move some boilerplate code having to do with overflow math safety
to functions.
Again the timing difference is not much:
Before:
./build size: 1.3 MB
hello.zig size: 308 KB
full test: 1m33.588s
debug test: 20.303s
hello.zig timing:
Name Start End Duration Percent
Initialize 0.0000 0.0000 0.0000 0.0002
Semantic Analysis 0.0000 0.0425 0.0425 0.2202
Code Generation 0.0425 0.0675 0.0250 0.1293
LLVM Emit Object 0.0675 0.1789 0.1114 0.5773
Build Dependencies 0.1789 0.1913 0.0124 0.0640
LLVM Link 0.1913 0.1931 0.0018 0.0091
Generate .h 0.1931 0.1931 0.0000 0.0000
Total 0.0000 0.1931 0.1931 1.0000
After:
./build size: 1.3 MB
hello.zig size: 301 KB
full test: 1m31.253s
debug test: 19.607s
hello.zig timing:
Name Start End Duration Percent
Initialize 0.0000 0.0000 0.0000 0.0002
Semantic Analysis 0.0000 0.0431 0.0431 0.2262
Code Generation 0.0431 0.0660 0.0229 0.1201
LLVM Emit Object 0.0660 0.1765 0.1105 0.5795
Build Dependencies 0.1765 0.1890 0.0125 0.0655
LLVM Link 0.1890 0.1906 0.0016 0.0086
Generate .h 0.1906 0.1906 0.0000 0.0000
Total 0.0000 0.1906 0.1906 1.0000
Diffstat (limited to 'src/link.cpp')
0 files changed, 0 insertions, 0 deletions
