News for hackers. Stuff that matters.
Re:App sizes are out of control by MBCook on Tuesday August 01, 2017 @05:59PM (#14905775)
Really? I've never heard that before. I'd guess it would be bigger if anything.

Any idea why that is?

Re:App sizes are out of control by unholiness on Tuesday August 01, 2017 @07:38PM (#14906528)
It's true, Java bytecode was basically designed for small size. The goal was to transmit java apps quickly over the internet, a hope which mostly died off as JS took over, but which in some ways has been reborn with android (dalvik bytecode is somewhat different but is definitely small). The main tradeoff for the small size is a total lack of optimization until the JIT compilation stage.

But there's no way it's anything like a 10x difference. There's definitely something else going on here, like some quirk about how the app store is calculating the sizes of assets.

Re:App sizes are out of control by johncolanduoni on Tuesday August 01, 2017 @08:22PM (#14906768)
I'm talking about the binaries themselves as they are output from dex2oat. The 10x difference is I suspect a product of needing to compile parts of the standard library in addition to the app's code.
Re:App sizes are out of control by johncolanduoni on Tuesday August 01, 2017 @09:20PM (#14907107)
Many things that Java does with a single instruction take much more than that in the target architecture. For example, virtual calls (which are used almost everywhere in Java) take several instructions on x86 and ARM while only one in Java or Dalvik bytecode.
Re:App sizes are out of control by tybit on Tuesday August 01, 2017 @10:17PM (#14907385)
Bytecode is much closer to source code than machine code (there's a cool discussion about this in https://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-...)

and source code is generally smaller than machine code.