Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Compact MJIT methods to single so file #1921
This is for https://bugs.ruby-lang.org/issues/14490.
In some conditions, this patch compacts all .o files to one .so file and load all methods from it again to improve memory locality of generated code. As this is an experimental version, MJIT attempts the compaction and reload only when one of following conditions are met:
In this benchmark, I'll compare following four conditions:
Using this script https://gist.github.com/k0kubun/10e6d3387c9ab1b134622b2c9d76ef51, calls some amount of different methods that just return
Smaller is better.
1 method (seconds)
50 methods (seconds)
1500 methods (seconds)
Response time (ms)
Here is the response time milliseconds for each percentile. Skipping 99%ile because it's the same as 100%ile in 100 calls.
Ratio (smaller is better)
Here is the response time increase ratio against no-JIT trunk's one. Bold results are ones faster than no-JIT trunk.