Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCompact MJIT methods to single so file #1921
+121
−15
Conversation
k0kubun
added some commits
Jul 27, 2018
matzbot
closed this
in
443f4d5
Jul 28, 2018
k0kubun
deleted the
k0kubun:single-so
branch
Jul 29, 2018
k0kubun
restored the
k0kubun:single-so
branch
Jul 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
k0kubun commentedJul 28, 2018
•
edited
This is for https://bugs.ruby-lang.org/issues/14490.
Changes
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:
Benchmark
In this benchmark, I'll compare following four conditions:
Micro benchmark
Using this script https://gist.github.com/k0kubun/10e6d3387c9ab1b134622b2c9d76ef51, calls some amount of different methods that just return
nil
. The following tables are its average duration seconds of 3 measurements.Smaller is better.
1 method (seconds)
50 methods (seconds)
1500 methods (seconds)
Discourse
Using the same benchmark strategy as https://bugs.ruby-lang.org/issues/14490 with this branch forked from discourse v1.8.11 to support running trunk.
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.