Inline policy method size values #1947

Closed
hosiawak opened this Issue Oct 7, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@hosiawak
Member

hosiawak commented Oct 7, 2012

I noticed that there are some hardcoded values in vm/llvm/inline_policy.hpp
that describe what JIT considers small, normal and large method size. The values
at the moment are 100, 300 and 2000 respectively.

Similarly to what we've done in #1426 I think it's worth considering the following:

  1. Enabling configuration of these variables via -Xjit.
  2. Bumping the default values. I don't have a fine tuned value for each but changing

100 to 300
300 to 1000
2000 to 3000

cuts the CI run time by 20% on my machine.

@hosiawak

This comment has been minimized.

Show comment
Hide comment
@hosiawak

hosiawak Oct 7, 2012

Member

The values I pasted above are also random btw, I'll see if I can find better default by running and benchmarking some real code.

Member

hosiawak commented Oct 7, 2012

The values I pasted above are also random btw, I'll see if I can find better default by running and benchmarking some real code.

@dbussink

This comment has been minimized.

Show comment
Hide comment
@dbussink

dbussink Oct 7, 2012

Member

Ah awesome, would love to have some numbers that at least based on running code instead of our own guesses ;).

Member

dbussink commented Oct 7, 2012

Ah awesome, would love to have some numbers that at least based on running code instead of our own guesses ;).

@brixen

This comment has been minimized.

Show comment
Hide comment
@brixen

brixen Oct 9, 2012

Member

@hosiawak any chance you could run this on perhaps a Rails app? Running RubySpec is not a great test of the JIT since the vast majority of code executes once. The biggest part of RubySpec that is running is a big loop. So you've probably succeeded in making that inline.

Member

brixen commented Oct 9, 2012

@hosiawak any chance you could run this on perhaps a Rails app? Running RubySpec is not a great test of the JIT since the vast majority of code executes once. The biggest part of RubySpec that is running is a big loop. So you've probably succeeded in making that inline.

@hosiawak

This comment has been minimized.

Show comment
Hide comment
@hosiawak

hosiawak Oct 9, 2012

Member

@brixen, true. I tested different values on some of my rails apps and didn't see much speed difference or it was negative. It might be that the current values are not bad actually, I'll play with it more when I get a moment.

Do you think these thresholds should be configurable with -Xjit.inline.{small,normal,large)_method_size (or something along these lines) anyway ?

Member

hosiawak commented Oct 9, 2012

@brixen, true. I tested different values on some of my rails apps and didn't see much speed difference or it was negative. It might be that the current values are not bad actually, I'll play with it more when I get a moment.

Do you think these thresholds should be configurable with -Xjit.inline.{small,normal,large)_method_size (or something along these lines) anyway ?

@brixen

This comment has been minimized.

Show comment
Hide comment
@brixen

brixen Oct 9, 2012

Member

@hosiawak making them configurable sounds terrific!

Member

brixen commented Oct 9, 2012

@hosiawak making them configurable sounds terrific!

@dbussink dbussink closed this in 9ae294b Nov 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment