Skip to content

Stage2/3 Causes 10x Drop in Performance #12518

@ominitay

Description

@ominitay

Zig Version

0.10.0-dev.3659+e5e6eb983

Steps to Reproduce

Extract https://0x0.st/o9zs.tar.xz into a subdirectory.
Build the attached project with stage1, and then with stage2/3, with the command zig build -Drelease-fast. Run each executable, and enter the command go depth 7. The number after nps indicates the speed of the program in nodes per second.

Expected Behavior

The values for nps would be roughly equal, or stage2/3 would produce a faster executable.

Actual Behavior

Stage2/3 produces an executable approximately 10x slower than stage1 does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.optimization

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions