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

recent performance regression in the x86 backend on print1mil benchmark #17678

Closed
Tracked by #17748
andrewrk opened this issue Oct 23, 2023 · 0 comments · Fixed by #17788
Closed
Tracked by #17748

recent performance regression in the x86 backend on print1mil benchmark #17678

andrewrk opened this issue Oct 23, 2023 · 0 comments · Fixed by #17788
Labels
arch-x86_64 64-bit x86 backend-self-hosted optimization regression It worked in a previous version of Zig, but stopped working.
Milestone

Comments

@andrewrk
Copy link
Member

print1mil.zig:

const std = @import("std");

fn print() void {
    std.io.getStdOut().writeAll("hello, world!\n") catch return;
}

pub fn main() !void {
    print();
    print();
    // ...
zig build-exe print1mil.zig -fno-llvm -fno-lld -fstrip
0.12.0-dev.617+d1e39b691:   804ms
0.12.0-dev.694+937e8cb70:   919ms
0.12.0-dev.704+8e1421f19:   774ms
0.12.0-dev.706+3bd1b9e15:   855ms
0.12.0-dev.708+8470652f1:   853ms
0.12.0-dev.709+c3042cbe1:  2840ms
0.12.0-dev.714+0f1652dc6:  2670ms
0.12.0-dev.733+6734d2117:  3020ms
0.12.0-dev.772+9f0d2f941:  3030ms
0.12.0-dev.927+895c81ce7:  6770ms
0.12.0-dev.1237+b82459fa4: 6350ms

c3042cb is the first bad commit

@andrewrk andrewrk added this to the 0.12.0 milestone Oct 23, 2023
@andrewrk andrewrk added the regression It worked in a previous version of Zig, but stopped working. label Oct 23, 2023
jacobly0 added a commit to jacobly0/zig that referenced this issue Nov 4, 2023
This reduces the regression from 0.11.0 by 95%.

Closes ziglang#17678
@mlugg mlugg moved this to Uncategorized in Performance Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x86_64 64-bit x86 backend-self-hosted optimization regression It worked in a previous version of Zig, but stopped working.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant