Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: None
-
Component/s: Compiler, Performance
-
Labels:None
-
Number of attachments :
Description
I've just updated the bench_load benchmark to include 1K load() calls for a class files compiled from rb files.
Compare the results. Essentially, loading compiled class is 5x-6x slower than loading rb class, which in turn 2x-3x times slower than loading in MRI. So, loading compiled class is 10x-15x slower than loading in MRI! Something is fishy!
JRuby:
D:\work\jruby-dev\jruby>jruby bench\bench_load.rb
user system total real
1 load 'fileutils-like' 0.077000 0.000000 0.077000 ( 0.056000)
1K load 'fileutils-like' 11.206000 0.000000 11.206000 ( 11.206000)
1K load compiled 'fileutils-like' 62.036000 0.000000 62.036000 ( 62.035000)
1K load 'rational' 3.442000 0.000000 3.442000 ( 3.442000)
10K require 'non-existing' 4.759000 0.000000 4.759000 ( 4.759000)
MRI:
ruby bench\bench_load.rb
user system total real
1 load 'fileutils-like' 0.016000 0.000000 0.016000 ( 0.007000)
1K load 'fileutils-like' 6.068000 0.327000 6.395000 ( 6.460370)
1K load 'rational' 1.810000 0.265000 2.075000 ( 2.086119)
10K require 'non-existing' 2.745000 11.014000 13.759000 ( 15.684897)
Issue Links
- relates to
-
JRUBY-4263
Loading of rb files is much slower in JRuby than in MRI (2x-5x)
-
See also JRUBY-4263.