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
YJIT: Add compilation time counter #8417
Conversation
Once the switch to Instant is made, could you also measure if there is any impact on total run time for the first iteration of e.g. 30k_ifelse. I would expect not, but just want to validate that this doesn't slow down benchmarks due to context switches. Always good to double-check. |
I ran one iteration of the following benchmarks: --yjit
--yjit-stats
This PR doesn't seem to impact the 1st itr performance whether this feature is enabled or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 👌
This PR adds a counter of cumulative time taken for compiling JIT code. Similar to
GC.stat(:time)
, if you call this before and after your request, you can measure how long you spent in YJIT compilation for each request.When we compare multiple Ruby versions, we could monitor
GC.stat(:time)
and this to check how much impact each of GC and YJIT had on their difference in performance.Example