Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Non-tiered AOT compiled code behaves similarly to statically compiled C++ code, in that no profiling information is collected and no JIT recompilations will happen."

My question is how much memory can be saved by not having the JIT. Sure you still have a GC with a heap (VM) but one of the big pigs in memory can be the JIT.



This is an interesting question. The JVM CodeCache is normally rather small 24MB-48MB. But the JIT and all of its IR/Branch tracking? I Imagine non-trivial.


wait. since when is 24-48MB trivial?

I would have hoped to see it sub 5MB.


Since we have significantly more RAM to spare than a few years ago and caching, almost by definition, is nothing but trading memory for cpu cycles. You want less memory? No problem, just remove the cache and recompute everything all the time, but don't cry if it takes time.

If 24-48MB is trivial completely depends on what is stored in this space, i.e. is there a more efficient representation for your stated goals? Context is king. Even 5MB could be non-trivial, depending on context.


Since Java.


Java can run in a few hundred KB, and is actually used a lot by electronic manufacturers.

There are quite a few manufacturers that have been replacing their firmware with such versions of Java.


How may I get this JVM you speak of?

    $ java -version
    openjdk version "1.8.0_91"
    OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
    OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

    $ java -Xmx999k
    Error occurred during initialization of VM
    Too small initial heap


Ahah,what about using an actual JVM for embedded hardware, instead of trolling?

If you don't know better I can gladly provide you some links to embedded Java vendors.


My point was that Java uses a lot of memory and < 5MB for code cache was an unrealistic expectation.

I welcome concrete counterexamples of why this expectation would be realistic.


Aonix PERC Ultra and Pico are into a few KB. Sorry documentation is no longer available since PTC bought Aonix

http://www.ptc.com/developer-tools/perc

JamaicaVM requires 1 MB

https://www.aicas.com/cms/en/JamaicaVM

MicroEJ can target Cortex-M processors with 128 KB flash and 32 KB RAM.

http://www.microej.com/products/device-software-development/...

Oracle's offerings, Java ME Embedded reference implementation requires 128 KB RAM and 1 MB ROM

http://www.oracle.com/technetwork/java/embedded/javame/index...

Java ME might not seem relevant in 2016, but it is running on the majority of Ricoh copiers

https://www.ricoh.com/esa/features.html#01

And smart devices produced by Gemalto like Cinterion, EHS6 digital phone or smart meters.

http://www.gemalto.com/m2m/development/innovation-technology...

http://www.gemalto.com/m2m/solutions/modules-terminals/indus...

Cisco phones,

http://www.cisco.com/c/en/us/products/collateral/collaborati...

And many other embedded manufactures, that are jumping into IoT.


Rather since we have multi-gig RAM on consumer machines.

On embedded systems it might not be trivial, but on my laptop with its 4gigs of RAM and even more so on my desktop with 16gigs, 50mbs is definitely trivial.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: