Skip to content

[fix] restore rescue nil performance #6031

Merged
headius merged 2 commits intojruby:masterfrom
kares:fix-rescue-nil-perf
Jan 13, 2020
Merged

[fix] restore rescue nil performance #6031
headius merged 2 commits intojruby:masterfrom
kares:fix-rescue-nil-perf

Conversation

@kares
Copy link
Member

@kares kares commented Jan 12, 2020

initially I thought rescue nil back-trace capturing is disabled on purpose
but seems it simply got lost at f64a3e0

follow-up on #6014

should introduce some perf.testing to avoid loosing performance

@kares kares added this to the JRuby 9.2.10.0 milestone Jan 12, 2020
@kares kares changed the title [fix] restore rescue nil backtrace-less performance [fix] restore rescue nil performance Jan 12, 2020
@headius
Copy link
Member

headius commented Jan 13, 2020

I wish there were a better way to test this but everything I can think of in Ruby would defeat the optimization.

Perhaps we could introduce something that tests the IR directly? Confirm that something like eval "foo rescue nil" includes the appropriate instruction to disable backtrace?

Looks good in any case, thank you!

@headius headius merged commit 77d5442 into jruby:master Jan 13, 2020
@kares
Copy link
Member Author

kares commented Jan 14, 2020

hey, thanks for the merge and response.

had the idea of doing like a 'performance' unit test (haven't looked into it).
establish a Java stack-trace-less exception baseline cost and assert our stack-trace less pass are not order of magnitude slower.

@headius
Copy link
Member

headius commented Jan 14, 2020

That could work too. My main worry about performance tests is that Travis will sporadically be slow, or become slow, for a given build. It would be better than nothing though.

We could also look at just setting up a periodic dedicated-server run of all benchmarks we've committed, tracking them over time like the Pypy project has done. Then at least we could get some mild notification if something regresses seriously.

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