-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Reported by @jeremyevans while improving perf of no-trace flow control exceptions.
The following benchmarks should perform roughly the same. Instead, the one with set_backtrace performs more like a normal exception with a full backtrace.
3-argument raise:
loop do
t = Time.now
1000000.times do
begin
raise(Exception, '', [])
rescue Exception
end
puts Time.now - t
endset_backtrace:
loop do
t = Time.now
1000000.times do
begin
e = Exception.new
e.set_backtrace([])
raise e
rescue Exception
end
puts Time.now - t
endThere's some logic missing in JRuby to avoid generating a backtrace if one is manually set.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels