3 ms·
Not denying that Java is/was popular, just that it's popularity was curbed by the lack of value types, direct memory allocation(unsafe) and a few other performa
by vvanders 8y ago
Not denying that Java is/was popular, just that it's popularity was curbed by the lack of value types, direct memory allocation(unsafe) and a few other performance sensitive features.
The same reason that you see Unity dominate the game space is that the native interop and cache usage story is much clearer.
FWIW JNI is not a silver bullet to performance problems by any means. The actual overhead of the JNI call either into or out of the VM is non-trivial and usually evicted whatever cache line you were touching. For things that are performance critical you'd usually see a drop of 10-50x between mixed JNI and code that was more cache aware but did the same work(in C++/C/C#).
- peterashford 8y agoThe irony here is that although C# has had direct memory and structs available for ages, Unity never took advantage of that - until just now - the in-development ECS / C# Jobs / Burst compiler architecture is utilising packed structs and manual memory allocation heavily. Why I say this is ironic is that Unity/C# have succeeded despite not using these features that you claim curb Java's popularity in the same space