Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another big improvement to dynamic property access: Fix dynamic dispa…
…tch perf (#36) There's a known issue with dynamic dispatch (Thanks to @topolarity to pointing this out) where it's super slow if you dispatch on a type / constructor. Our code had a dispatch on Blob{FT} with an unknown FT in the case of a dynamic field access. That was causing very slow performance. By changing this to a helper function (make_blob), we do a performant dispatch, dramatically improving perf. Now, dynamic field access on a Blob has the ~same~ even better performance as dynamic field access on a regular julia object! :) Before: ```julia julia> @Btime ((a)->a[1].y)($(Any[foo])) 115.105 ns (2 allocations: 48 bytes) Blob{Float32}(Ptr{Nothing} @0x000000016fe73d90, 8, 12) ``` After: ```julia julia> @Btime ((a)->a[1].y)($(Any[foo])) 48.015 ns (1 allocation: 32 bytes) Blob{Float32}(Ptr{Nothing} @0x000000016fe73d90, 8, 12) # Comparison to getproperty on a normal struct: julia> @Btime ((a)->a[1].y)($(Any[Foo(2,3)])) 52.550 ns (2 allocations: 48 bytes) 3.0f0 ``` Follow up to #35.
- Loading branch information
eb8d46d
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.
@JuliaRegistrator register()
Release Notes
Performance improvements for the case of dynamic, type-unstable field access.
Hopefully you don't do those, but if you do, this will be faster. :)
eb8d46d
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.
Registration pull request created: JuliaRegistries/General/123679
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
Also, note the warning: Version 1.1.1 skips over 1.0.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.
eb8d46d
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.
@JuliaRegistrator register()
Release Notes
Performance improvements for the case of dynamic, type-unstable field access.
Hopefully you don't do those, but if you do, this will be faster. :)
eb8d46d
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.
Registration pull request updated: JuliaRegistries/General/123679
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
Also, note the warning: Version 1.1.1 skips over 1.0.0
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.
eb8d46d
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.
@JuliaRegistrator register()
Release Notes
Performance improvements for the case of dynamic, type-unstable field access.
Hopefully you don't do those, but if you do, this will be faster. :)
eb8d46d
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.
Registration pull request updated: JuliaRegistries/General/123679
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: