Hacker News new | ask | show | jobs
by pron 3676 days ago
> I agree, but how did customers need JIT? I thought it was just to compensate for the inherent performance penalty of an extra layer, of a VM.

Good -- and simple[1] -- abstractions require lots of dynamic dispatch, that can be optimized away by a JIT. The problem is far simpler (and may be solved partially, AOT, if you don't have dynamic linking and especially dynamic code loading, as is the case on Android).

> and array-bounds checking (um... is that last one a "linguistic" feature?)

I would definitely classify that as extra-linguistic.

> But I meant by my statement, that these folks think intrinsic value is the only "real" value, that they dispute extrinsic value entirely! i.e. that ideas are eternal, valuable absolutely and despite context; and contingent fluctuations in supply and demand, progress of technology and install base etc are 100% meaningless.

I understand and completely agree.

[1]: You can do away with a lot of dynamic dispatch at the cost of a larger number (and therefore less simple) abstractions, as in the case of Rust.

1 comments

> Good -- and simple[1] -- abstractions require lots of dynamic dispatch

So they don't need the JIT per se, but for linguistic abstractions... to be performant, which is non-linguistic. That's splitting hairs though. So, James' customers needed those abstractions, and _he_ said they needed a JIT.

Incidentally, I've been doing dynamic code loading on Android 5.0, with its AOT. So it works. For my use, it's hard to tell if its startup is slower, though I'd expect it to be.

I hadn't heard that about Rust.

> 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.

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.