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 There's a known issue with dynamic dispatch (Thanks to Cody 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! :) ```julia julia> @Btime getproperty($(foo), $(:y)) 19.057 ns (0 allocations: 0 bytes) Blob{Float32}(Ptr{Nothing} @0x000000016fe73d90, 8, 12) julia> @Btime getproperty($(Foo(1,2)), $(:y)) 25.477 ns (2 allocations: 48 bytes) 2.0f0 ```
- Loading branch information