I know that Java\'s HotSpot JIT will sometimes skip JIT compiling a method if it expects the overhead of compilation to be lower than the overhead of running the method in i
I don't believe so, and I don't think that it ever should.
How could the JIT know how many times a particular method would be called? Wouldn't the frequency of interpretation factor into the decision?
I would also question how well a JIT compiler would be able to analyze a function to determine whether or not interpretation would be best without interpreting the function itself. And given that fact (that at least one pass of the method has taken place) wouldn't it be better to simply compile each method to reduce the overhead of trying to determine which methods get compiled in the first place?