-
Notifications
You must be signed in to change notification settings - Fork 9
Reduce amount of LLVM code generated for specialized getindex #31
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
Reduce amount of LLVM code generated for specialized getindex #31
Conversation
| @noinline function _throw_assert_not_null_error(typename::Symbol) | ||
| throw(AssertionError("Null pointer dereference in Blob{$(typename)}")) | ||
| end |
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.
❤️
src/blob.jl
Outdated
| quote | ||
| $(Expr(:meta, :inline)) | ||
| Blob{$(fieldtype(T, i))}(blob + $(blob_offset(T, i))) | ||
| $(Blob{fieldtype(T, i)})(blob, $(blob_offset(T, i))) |
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.
I think / hope that the size of the code generated shouldn't be affected at all by moving the Blob{T} type construction inside or outside the quote, since it should definitely compile away during Julia's inference phase, and shouldn't show up at all in the LLVM code?
But i think it's fine how you have it too 👍
NHDaly
left a comment
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.
Cool, this LGTM, if you still want to proceed with it!
|
@robertbuessow, I hope you don't mind: @NHDaly and I took the liberty of resolving the merge conflicts following merge of Nathan's recently landed pull request (#28), and added a couple other touchups. |
Less code for getindex boundscheck