-
-
Notifications
You must be signed in to change notification settings - Fork 942
Description
Environment
JRuby 1.7.20.1, JRuby 9.1.0.0, JRuby 9.1.1.0; run from Java via ScriptingContainer, with various values tested for the setCompileMode method. Standalone script execution with no frameworks.
Expected Behavior
Expected performance for Time.parse to be on par with performance for 1.7.x.
Actual Behavior
Time.parse seems to be roughly 60% slower in JRuby 9k than in 1.7.x.
I have set up a github repo with a simple reproducer here:
https://github.com/cprice404/jruby9k-benchmarks/tree/19a2719e4edddc17e3f1fabbf311b9d80c6eba80/time-parse-comparison
Here are some relevant numbers from the benchmark output (the rest of it is available in the linked reproducer repro if you are interested):
JRUBY VERSION: 1.7.20.1
COMPILE MODE: off
user system total real
warmup (100 runs): 0.213000 0.000000 0.213000 ( 0.213000)
middle (10000 runs): 1.179000 0.000000 1.179000 ( 1.179000)
tail (100 runs): 0.009000 0.000000 0.009000 ( 0.009000)
JRUBY VERSION: 9.1.1.0
COMPILE MODE: off
user system total real
warmup (100 runs): 0.730000 0.010000 0.740000 ( 0.138776)
middle (10000 runs): 4.890000 0.300000 5.190000 ( 1.905043)
tail (100 runs): 0.030000 0.010000 0.040000 ( 0.019285)
Also tested with compileMode set to JIT; that doesn't seem to make much difference in 1.7, and makes the numbers look worse in 9k (though the benchmark may not have had a long enough execution time to give a fair characterization of JIT).