Hacker News new | ask | show | jobs
by pron 3677 days ago
> Incidentally, I've been doing dynamic code loading on Android 5.0, with its AOT.

How does that work? Or is their AOT really a JIT that works all at once, rather than collecting a profile first?

> I hadn't heard that about Rust.

Basically, in Rust (as in C++) you can pick either static dispatch abstractions, which are "zero cost", and dynamic dispatch abstractions, that are more costly. On the JVM you get dynamic dispatch as the abstraction, and the JIT figures out whether static dispatch can suffice per callsite, and compiles the dynamic abstraction to static-dispatch machine code.

1 comments

Sorry for the delay. It works just the same as dalvikvm, using DexClassLoader. I guess it must just compile then run - like a JIT without profiling, as you say. But I don't know the innards.

Thanks for the info on rust.