Skip to content
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

Fix #10208 - Unnecessary boxing to call jl_object_id #31771

Merged
merged 1 commit into from
Apr 22, 2019
Merged

Fix #10208 - Unnecessary boxing to call jl_object_id #31771

merged 1 commit into from
Apr 22, 2019

Conversation

Keno
Copy link
Member

@Keno Keno commented Apr 19, 2019

Introduce a fast path that passes the type and the data separately
to jl_object_id_. Fixes the allocation performance problems noted
in the issue, though the Foo version is still approx 4x slower,
since the Int version doesn't have to go through a call to compute
its hash. Fixing that is future work.

emit_typeof_boxed(ctx, val),
val.isghost ? ConstantPointerNull::get(T_pint8_derived) :
ctx.builder.CreateBitCast(
decay_derived(data_pointer(ctx, val)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only .ispointer values have pointers (otherwise we just return garbage from data_pointer)

@Keno Keno force-pushed the kf/10208 branch 2 times, most recently from ed06060 to 3923252 Compare April 20, 2019 22:31
Introduce a fast path that passes the type and the data separately
to jl_object_id_. Fixes the allocation performance problems noted
in the issue, though the `Foo` version is still approx 4x slower,
since the Int version doesn't have to go through a call to compute
its hash. Fixing that is future work.
@Keno
Copy link
Member Author

Keno commented Apr 22, 2019

This is updated for the .ispointer case.

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.

2 participants