-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Try using "native" boundschecking for Array #20485
Conversation
@jrevels Do you know why the soldier is still giving the |
Ref here, I'm not deploying the changes/doing all the test runs until Nanosoldier supports a serialization compatibility layer to prevent JLD breakage with the current BenchmarkTools. |
Trial by fire it is ;) JuliaCI/Nanosoldier.jl#28 (comment) @nanosoldier |
## Indexing: getindex ## | ||
|
||
# This is more complicated than it needs to be in order to get Win64 through bootstrap | ||
getindex(A::Array, i1::Int) = arrayref(A, i1) | ||
getindex(A::Array, i1::Int, i2::Int, I::Int...) = (@_inline_meta; arrayref(A, i1, i2, I...)) # TODO: REMOVE FOR #14770 | ||
function getindex(A::Array, i1::Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why is the 1-argument definition needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's historical. Win32 had trouble with this at some point. It can probably be simplified, but I'm not inclined to mess with it unless there's a good reason to change it.
ref my comment here:
@nanosoldier |
Argh, forgot to update FileIO on one of the nodes. Just did so. Third time's a charm? @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
Thanks @jrevels! Let's try short-circuiting. @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
Bummer. That's better, but still terrible. The first few benchmarks I looked at were slower because |
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @jrevels |
This seems like a good plan: it should make switching to a Julia-based implementation of multi-dimensional arrays easier. I might request keeping the code around for doing codegen-based bounds checking, as it can come in useful when debugging inference / codegen errors. But it's OK if that's a slower, coarser memory range validation. |
Any advice or help on the remaining regressions here? I've gotten this as close as I can for now. |
63512b1
to
1388619
Compare
@nanosoldier |
Hm, Nanosoldier seems to have missed the prod. @nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
I expect (most of?) those regressions should be fixed now that #22826 is merged. |
Only one way to find out. :) @nanosoldier Edit: Except there are merge conflicts so this won't be informative. Sorry! Need conflicts resolved before Nanosoldier can use the merge commit. |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
Regressions are real, but they're for the old version – this needs to have conflicts resolved or be merged and then have nanosoldier retriggered before we can find out if it's ok now. |
This isn't nearly as important as it was before Jameson's #22826. That PR solved the real problem in the disparity between the Julia and C bounds check removal. See #20469 (comment) for an example; #23516 adds that as a test. Moving more things from C to Julia is nice, and dogfooding boundscheck/checkbounds in Array is also good, but now that the bug is fixed it would be unobservable. So this PR will go to the bottom of my list now. |
Closing, since we fixed the problem this was attempting to address |
Just a trial balloon. The LLVM looks pretty good, but it's semantically different as it uses
&
instead of&&
for each dimension. Let's try this. @nanosoldierrunbenchmarks(ALL, vs = ":master")
Fixes #20469.