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

Projects
None yet
3 participants
@original-brownbear
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

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

continuous-integration/travis-ci/pr The Travis CI build failed
Details

@original-brownbear original-brownbear deleted the original-brownbear: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
You can’t perform that action at this time.