Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Inline policy method size values #1947

Closed
hosiawak opened this Issue · 5 comments

3 participants

@hosiawak
Collaborator

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
Collaborator

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
Owner

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

@brixen
Owner

@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
Collaborator

@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
Owner

@hosiawak making them configurable sounds terrific!

@dbussink dbussink closed this in 9ae294b
@Gibheer Gibheer referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.