-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simple pass at giving union fields an optimized layout
unlike codegen, only bitstypes (!isptr) fields are permitted in the union and the offset count starts from 0 instead of 1 but otherwise the tindex counter is compatible
- Loading branch information
Showing
7 changed files
with
206 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8d5da6a
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.
@vtjnash, I think I tracked down the extra allocation I'm seeing in my Union performance tests (mentioned here). It seems to come down to the
jl_builtin_arrayset
codegen here, because I get amerge_own
block in my@code_llvm
It looks like to get there, it's going down the
isboxed == true
code path; is this another place that can be optimized for Unions w/isbits
types?8d5da6a
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.
And in looking into the Vector allocation performance, it seems like we'd want to update this code to allow
isbits
Union types, though I just realized looking back over all the code here that this is optimizing field layout, not array layout. I think that's been mentioned as doable though?