JRuby invokedynamic updates for November
Charles Oliver Nutter
headius at headius.com
Thu Dec 1 12:48:43 PST 2011
On Thu, Dec 1, 2011 at 9:47 AM, Stephen Bannasch
<stephen.bannasch at deanbrook.org> wrote:
> At 3:29 AM -0600 12/1/11, Charles Oliver Nutter wrote:
>>This is a pretty disappointing finding. I'm not yet sure whether it's
>>a bug in SwitchPoint optimization or in JRuby's use of SwitchPoint,
>>but I'd like to see your numbers with and without this flag.
>
> Latest JRuby master, on Java 1.6.0_27, macosx-port (1.7.0) amd mlvm (1.8.0)
>
> Summary: without changing SwitchPoint mlvm performance is similar to 1.6.0_27 -- macosx-port (1.7.0) is about 50% slower onrexml test
My numbers match yours for the first run, with 1.8.0 + indy being
about on par or slightly slower/faster than 1.6.0_27. However if I run
for more than one iteration, 1.8.0 wins across the board.
1.6 first iteration:
Rehearsal ---------------------------------------------------------
rexml 5.517000 0.000000 5.517000 ( 5.517000)
hpricot 0.957000 0.000000 0.957000 ( 0.958000)
jdom_document_builder 0.908000 0.000000 0.908000 ( 0.908000)
nokogiri 1.328000 0.000000 1.328000 ( 1.328000)
------------------------------------------------ total: 8.710000sec
user system total real
rexml 3.656000 0.000000 3.656000 ( 3.656000)
hpricot 0.481000 0.000000 0.481000 ( 0.481000)
jdom_document_builder 0.195000 0.000000 0.195000 ( 0.195000)
nokogiri 0.327000 0.000000 0.327000 ( 0.327000)
1.8 first iteration:
Rehearsal ---------------------------------------------------------
rexml 6.077000 0.000000 6.077000 ( 6.077000)
hpricot 1.013000 0.000000 1.013000 ( 1.013000)
jdom_document_builder 0.964000 0.000000 0.964000 ( 0.964000)
nokogiri 1.344000 0.000000 1.344000 ( 1.344000)
------------------------------------------------ total: 9.398000sec
user system total real
rexml 3.322000 0.000000 3.322000 ( 3.322000)
hpricot 0.391000 0.000000 0.391000 ( 0.391000)
jdom_document_builder 0.195000 0.000000 0.195000 ( 0.195000)
nokogiri 0.323000 0.000000 0.323000 ( 0.323000)
1.6 second iteration:
Rehearsal ---------------------------------------------------------
rexml 3.446000 0.000000 3.446000 ( 3.446000)
hpricot 0.430000 0.000000 0.430000 ( 0.430000)
jdom_document_builder 0.187000 0.000000 0.187000 ( 0.187000)
nokogiri 0.323000 0.000000 0.323000 ( 0.323000)
------------------------------------------------ total: 4.386000sec
user system total real
rexml 3.427000 0.000000 3.427000 ( 3.427000)
hpricot 0.435000 0.000000 0.435000 ( 0.435000)
jdom_document_builder 0.190000 0.000000 0.190000 ( 0.190000)
nokogiri 0.324000 0.000000 0.324000 ( 0.324000)
1.8 second iteration:
Rehearsal ---------------------------------------------------------
rexml 2.697000 0.000000 2.697000 ( 2.697000)
hpricot 0.378000 0.000000 0.378000 ( 0.378000)
jdom_document_builder 0.186000 0.000000 0.186000 ( 0.186000)
nokogiri 0.319000 0.000000 0.319000 ( 0.319000)
------------------------------------------------ total: 3.580000sec
user system total real
rexml 2.711000 0.000000 2.711000 ( 2.711000)
hpricot 0.386000 0.000000 0.386000 ( 0.386000)
jdom_document_builder 0.192000 0.000000 0.192000 ( 0.192000)
nokogiri 0.318000 0.000000 0.318000 ( 0.318000)
1.6 fifth iteration:
Rehearsal ---------------------------------------------------------
rexml 3.386000 0.000000 3.386000 ( 3.386000)
hpricot 0.431000 0.000000 0.431000 ( 0.431000)
jdom_document_builder 0.186000 0.000000 0.186000 ( 0.186000)
nokogiri 0.321000 0.000000 0.321000 ( 0.321000)
------------------------------------------------ total: 4.324000sec
user system total real
rexml 3.385000 0.000000 3.385000 ( 3.385000)
hpricot 0.434000 0.000000 0.434000 ( 0.434000)
jdom_document_builder 0.187000 0.000000 0.187000 ( 0.187000)
nokogiri 0.313000 0.000000 0.313000 ( 0.313000)
1.8 fifth iteration:
Rehearsal ---------------------------------------------------------
rexml 2.615000 0.000000 2.615000 ( 2.615000)
hpricot 0.369000 0.000000 0.369000 ( 0.369000)
jdom_document_builder 0.180000 0.000000 0.180000 ( 0.179000)
nokogiri 0.310000 0.000000 0.310000 ( 0.310000)
------------------------------------------------ total: 3.474000sec
user system total real
rexml 2.679000 0.000000 2.679000 ( 2.679000)
hpricot 0.368000 0.000000 0.368000 ( 0.368000)
jdom_document_builder 0.179000 0.000000 0.179000 ( 0.179000)
nokogiri 0.320000 0.000000 0.320000 ( 0.320000)
The nokogiri numbers probably won't vary over versions much, since
there's a lot of Java code involved. But it's the only one that's not
consistently faster on 1.8, so that's curious.
The rexml numbers seem to be convincingly faster, allowing for warmup.
If I pass -X+C it also helps reduce warmup time a bit:
I have more perf investigations happening on my end, so I'll keep
pushing fixes as they come up. If you have other loads that look like
they're slower on JRuby master + 1.8, let me know!
- Charlie
More information about the mlvm-dev
mailing list