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

String concatenation slower with invokedynamic enabled #3798

Open
nirvdrum opened this issue Apr 12, 2016 · 0 comments
Open

String concatenation slower with invokedynamic enabled #3798

nirvdrum opened this issue Apr 12, 2016 · 0 comments

Comments

@nirvdrum
Copy link
Contributor

I've been looking at the performance of string concatenation because it's a large components of templating engines, such as ERB. I wrote up a simple benchmark for bench9000 that peforms most of the ERB operations, up until the point ERB would eval:

https://github.com/nirvdrum/bench9000/tree/erb

With JRuby 9.0.5.0, I'm seeing invokedynamic run at 57% the speed of the Java 6 JIT approach. The bench9000 scores:

templating-erb jruby-9.0.5.0-noindy 1719.1838898067751
templating-erb jruby-9.0.5.0-indy 990.685819361973

NB: I haven't investigated and it may be that one of the other operations, such as String#force_encoding is to blame. But String#concat is by far the most frequently called method in the benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant