Skip to content

Performance regression in "Add externfn macro and correctly label fixed_stack_segments" #8782

Closed

Description

I've noticed a minor performance regression in 0479d94 or maybe 303f650. Unfortunately, 303f650 doesn't compile, so, I can't be quite sure. The revision before that, c178b52, is fine. I've also tested it against current master, 1ac7d80.

I don't have a small test case that demonstrates the issue. All I have is a large one. Check out the "performance-regression" branch of https://github.com/DaGenix/rust-working and then run the benchmark on the test.rc file - the relevant item is aes::bench::aes_bench_x8 (there is lots of messy code in there; I apologize for that, I use that repository mostly as a backup for my main computer).

All tests were run with --opt-level 3 on a Core i5 under 64-bit Ubuntu. Performance is likely drastically different on an architecture where LLVM can't use the SSE instructions, so, I don't know how well this reproduces outside of x86_64.

c178b52 (last fast revision):

83.49 MB/s

0479d94 (first slow revision that compiles):

80.60 MB/s

1ac7d80 (current master):

79.60 MB/s

Here is where it gets interesting: the code being benchmarked is mostly just the contents of the aessafe.rs file. I took code from that file and everything it depends on and moved it into a single file at: https://gist.github.com/DaGenix/6348471. When I benchmark this file using master, I get the faster (83.71 MB/s) performance.

This certainly isn't the ideal test case for this issue, although I'm not sure how to chop down the code to get a better test case at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions