Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macho: fix perf bug in DWARF parsing #140

Merged
merged 3 commits into from
May 25, 2024
Merged

macho: fix perf bug in DWARF parsing #140

merged 3 commits into from
May 25, 2024

Conversation

kubkon
Copy link
Owner

@kubkon kubkon commented May 24, 2024

Fixes #138

Drops link time in #138 from approx 22.70s to approx 6.28s as measured with time utility, and brings peak RSS down from approx 16GB to 2.4GB as measured with tracy. In both cases I measured the following command:

$ xcrun clang++ -o foo objs/* -fuse-ld=/Users/kubkon/dev/zld/zig-out/bin/ld64.zld

The performance when running via zig itself is similar:

$ time ~/dev/zig/build/stage3/bin/zig c++ -o foo objs/*
________________________________________________________
Executed in    6.55 secs    fish           external
   usr time    5.74 secs    0.12 millis    5.74 secs
   sys time    2.77 secs    2.00 millis    2.77 secs

@kubkon
Copy link
Owner Author

kubkon commented May 24, 2024

Matching changes in Zig upstream can be found in ziglang/zig@ed7073c Before I hit the merge button on both, I wanna ponder adding some more coverage for debug info for macho, however the changes can be used to build the compiler and test against the sources in #138.

@kubkon kubkon mentioned this pull request May 24, 2024
@kubkon kubkon marked this pull request as ready for review May 24, 2024 20:38
@kubkon kubkon merged commit 72a0152 into main May 25, 2024
4 of 8 checks passed
@kubkon kubkon deleted the macho-perf-bug branch May 25, 2024 04:26
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.

zld performance on macos
1 participant