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

remove elem_val_node and field_val #15688

Closed
wants to merge 2 commits into from
Closed

Conversation

Vexu
Copy link
Member

@Vexu Vexu commented May 13, 2023

These instructions cause a lot of performance issues in debug builds.

Closes #15685

Vexu added 2 commits May 13, 2023 14:57
These instructions cause a lot of performance issues in debug builds.
@andrewrk
Copy link
Member

Please provide some performance measurements before/after with this branch

@Vexu
Copy link
Member Author

Vexu commented May 14, 2023

The example from the linked issue gets about 230x faster in debug mode:

master  Time: 72909250 Sum: 536854528
this pr Time:   316935 Sum: 536854528

and 40 000x faster with ReleaseFast (though I'm more suspicious of that number):

master  Time: 73224314 Sum: 536854528
this pr Time:     1884 Sum: 536854528

andrewrk added a commit that referenced this pull request May 31, 2023
The Zig language allows the compiler to make this optimization
automatically. We should definitely make the compiler do that, and
revert this commit. However, that will not happen in this branch, and I
want to continue to explore achieving performance parity with
merge-base. So, this commit changes all InternPool parameters to be
passed by const pointer rather than by value.

I measured a 1.03x ± 0.03 speedup vs the previous commit compiling the
(set of passing) behavior tests. Against merge-base, this commit is
1.17x ± 0.04 slower, which is an improvement from the previous
measurement of 1.22x ± 0.02.

Related issue: #13510
Related issue: #14129
Related issue: #15688
andrewrk added a commit that referenced this pull request Jun 4, 2023
The Zig language allows the compiler to make this optimization
automatically. We should definitely make the compiler do that, and
revert this commit. However, that will not happen in this branch, and I
want to continue to explore achieving performance parity with
merge-base. So, this commit changes all InternPool parameters to be
passed by const pointer rather than by value.

I measured a 1.03x ± 0.03 speedup vs the previous commit compiling the
(set of passing) behavior tests. Against merge-base, this commit is
1.17x ± 0.04 slower, which is an improvement from the previous
measurement of 1.22x ± 0.02.

Related issue: #13510
Related issue: #14129
Related issue: #15688
jacobly0 pushed a commit to jacobly0/zig that referenced this pull request Jun 11, 2023
The Zig language allows the compiler to make this optimization
automatically. We should definitely make the compiler do that, and
revert this commit. However, that will not happen in this branch, and I
want to continue to explore achieving performance parity with
merge-base. So, this commit changes all InternPool parameters to be
passed by const pointer rather than by value.

I measured a 1.03x ± 0.03 speedup vs the previous commit compiling the
(set of passing) behavior tests. Against merge-base, this commit is
1.17x ± 0.04 slower, which is an improvement from the previous
measurement of 1.22x ± 0.02.

Related issue: ziglang#13510
Related issue: ziglang#14129
Related issue: ziglang#15688
andrewrk added a commit that referenced this pull request Jun 11, 2023
The Zig language allows the compiler to make this optimization
automatically. We should definitely make the compiler do that, and
revert this commit. However, that will not happen in this branch, and I
want to continue to explore achieving performance parity with
merge-base. So, this commit changes all InternPool parameters to be
passed by const pointer rather than by value.

I measured a 1.03x ± 0.03 speedup vs the previous commit compiling the
(set of passing) behavior tests. Against merge-base, this commit is
1.17x ± 0.04 slower, which is an improvement from the previous
measurement of 1.22x ± 0.02.

Related issue: #13510
Related issue: #14129
Related issue: #15688
@andrewrk
Copy link
Member

Closing abandoned draft

@andrewrk andrewrk closed this Jun 18, 2023
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.

Still another array access performance issue (in debug)
2 participants