C
Charles Oliver Nutter
John said:Charles Oliver Nutter:
Actually, we've recently enabled an interpreted mode in IronRuby / DLR. We run interpreted by default until a method gets called multiple times, and then we compile. The exact heuristic hasn't been finalized yet, but we're forced to do this to do better on startup perf. The cost of JIT is rather expensive ...
I'll be interested to see what heuristic you come up with. Currently
JRuby just uses "20 invocations" as the deciding moment. This ends up
working great for small apps, where the code you want compiled gets
compiled quickly. But for large apps, it seems we may want an upper
limit on the number of JITed methods, since it can eventually swamp the
system with barely-used code.
- Charlie