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

PERFORMANCE: Smaller bytecode for interface impl returns #4780

Merged
merged 1 commit into from Sep 7, 2017

Conversation

@original-brownbear
Copy link
Contributor

@original-brownbear original-brownbear commented Sep 6, 2017

Same as #4777 but for the return type.
There is no point in running the typecast if the return type is an IRubyObject :)

That said ... small disclaimer:

I'm a little unsure I didn't make a mistake here, functionally this seems fine in my testing (and is fairly straightforward imo) but the performance gain is much bigger than that from #4777.
The org.jruby.benchmark.JavaInterfaceBenchmark#benchHalfRubyVersion benchmark goes from 0.036ops/ns to 0.045ops/ns for me, which seems like an unexpectedly huge increase.

@headius
Copy link
Member

@headius headius commented Sep 6, 2017

This seems fine to me. Do you have a lot of code where you're returning IRubyObject types from an interface impl into Java?

@original-brownbear
Copy link
Contributor Author

@original-brownbear original-brownbear commented Sep 6, 2017

@headius we have a few spots (especially in upcoming Logstash changes), same as with #4777 I see real world improvements in them from this one :)

@headius
Copy link
Member

@headius headius commented Sep 7, 2017

Ok cool, thanks for confirming that. Good patch.

@headius headius merged commit d771533 into jruby:master Sep 7, 2017
1 check failed
@original-brownbear original-brownbear deleted the smaller-bytecode-return branch Sep 8, 2017
@enebo enebo added this to the JRuby 9.2.0.0 milestone Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants