-
Notifications
You must be signed in to change notification settings - Fork 7
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
Investiage -Z mir-opt-level
more.
#287
Comments
Did you also enable |
The sysroot is built as-per-usual (with optimisations), so I guess that will be either 2 or 3? Either way, we can't trace the std lib. |
Yes, but if any |
Repeating the experiment with opt-level 2 or 3 for the compiler, I often get this crash:
I'm guessing that's our fault. |
What is the backtrace? |
There's no rust backtrace, as the process crashes in a dirty way. Getting a backtrace in gdb, the top frame is a |
Wait, I'm talking rubbish:
so it's libc cutting us short. That explains why |
Closing, as this is for the old yk design. |
We currently don't optimise the external workspace, as hardware tracing requires that LLVM doesn't re-order our blocks.
But that's not to say that we can't optimise the MIR before it is lowered to SIR. And this pretty much amounts to passing
-Z mir-opt-level=X
, where X is some value, e.g. 3.I quickly tried passing
-Z mir-opt-level=3
to see if the speedup would be dramatic. I fully expected breakage due to unimplemented codegen paths, but actually it wasn't that bad.I had to implement comparison with constants, which I did quickly and inefficiently:
And then we don't lower constant structs (to get that right, I'd recommend addressing #139). This is only needed for the
simple_multithreaded_interpreter
test, which uses a constantArcInner
. I just commented the test.Then the results for running the test suite (10 runs) look like:
single test thread before
single test thread after
many test threads before
many test threads after
This indicates very little performance change. We put this down to the code we trace in tests being small and probably not benefiting much from MIR (and thus SIR) optimisations.
We agreed to come back to this when we have a larger interpreter to test with.
The text was updated successfully, but these errors were encountered: