The Great Startup Problem

Per Bothner per at
Sun Aug 24 17:02:20 UTC 2014

On 08/24/2014 03:46 AM, Marcus Lagergren wrote:
> Hi Per!
> This is mostly invokedynamic related. Basically, an indy callsite
> requires a lot of implicit class and byte code generation, that is
> the source of the overhead we are mostly discussing. While tiered
> compilation adds non determinism, it is usually (IMHO) bearable…

Right.  However, let me make these provocative (?) points:

(1) Kawa shows you can have dynamic languages on the JVM that both
run fast and have fast start-up.

(2) Other dynamic languages (Ruby, JavaScript, PHP) have had more problems,
possibly because they are "too dynamic".  Or perhaps just their kind of
"dynamicism" is a poor match for the JVM.

(3) "Too dynamic" does not inherently mean a flaw in either the JVM *or*
the language, just a mis-match.  (Though I'm of the school that believes
"more staticness" is better for programmer productivity and software quality
- as well as performance.  Finding the right tradeoff is hard.)

(4) Invokedynamic was a noble experiment to alleviate (2), but so far it
does not seem to have solved the problems.

(5) It is reasonable to continue to seek improvements in invokedynamic,
but in terms of resource prioritization other enhancement in the Java platform
(value types, tagged values, reified generics, continuations, removing class size
limitations, etc etc) are more valuable.

(6) That of course does not preclude an "aha": If we made modest change xyz,
that could be a big help.  I just don't think Oracle or the community should
spend too much time on "fixing" invokedynamic.

(7) Of course I'm the wrong person to talk about resource prioritization,
have spent way too much time doing micro-optimizations or adding improvements
that nobody will notice.  So charge ahead with my blessing :-)
	--Per Bothner
per at

More information about the mlvm-dev mailing list