Skip to content

Conversation

@robertbuessow
Copy link
Contributor

@robertbuessow robertbuessow commented Oct 2, 2024

Less code for getindex boundscheck

Comment on lines +52 to +54
@noinline function _throw_assert_not_null_error(typename::Symbol)
throw(AssertionError("Null pointer dereference in Blob{$(typename)}"))
end
Copy link
Member

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)))
Copy link
Member

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 👍

Copy link
Member

@NHDaly NHDaly left a 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 robertbuessow changed the title Reduce amount of LLVM code generated for specialized getindex Move boundscheck to constructor to reduce getindex llvm code Oct 29, 2024
@robertbuessow robertbuessow changed the title Move boundscheck to constructor to reduce getindex llvm code Reduce amount of LLVM code generated for specialized getindex Oct 29, 2024
@Sacha0
Copy link
Contributor

Sacha0 commented Jan 21, 2025

@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.

@Sacha0 Sacha0 marked this pull request as ready for review January 21, 2025 22:10
@NHDaly NHDaly merged commit 7c4e441 into RelationalAI-oss:main Jan 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants