Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #24895
| Date | 2013-08-03 20:01 +0200 |
|---|---|
| From | Marcel Müller <news.5.maazl@spamgourmet.org> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java compilers |
| References | <adfa1b2f-ad3b-4061-9fc0-ae166908a02b@googlegroups.com> |
| Message-ID | <51fd455f$0$6559$9b4e6d93@newsspool4.arcor-online.net> (permalink) |
| Organization | Arcor |
On 03.08.13 19.29, Olurotimi Ajayi-Dopemu wrote: > Are there Java compilers that allow the compiled code to be run from an existing operating system. IE compile source on linux run only on linux after compilation. This is mostly a speed question but if anyone can add pros or cons of this that would be great. In most cases you can only loose. The Java concept involves the JIT compiler that does exactly what you are describing, but on each run of the JVM. So the only thing you can save is the time for the JIT. You will agree, that this is always a O(1) Problem regarding one application, adding some constant time to an application run. But on the other side there are several drawbacks. First of all Linux is not Linux. There are different CPUs, different ABIs and so on. So if you compile for a target platform, it must either use the common denominator of a set of platforms or be specific to exactly one existing machine with exactly one kernel and so on. Taking the common denominator of let's say linux ELF on x64 leaves different CPU features like AVX unused around. Compiling for exactly one platform on the other side may result in code that will no longer run after slight changes, like new hardware or something like that. So what are the benefits of precompiled byte code? Nu rule forbids caching of the JIT results by the JVM. So the benefit of precompiled code could be combined with the benefits of JIT. But as long as the time taken for JIT compilation is comparably small even that makes no sense. Marcel
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Java compilers Olurotimi Ajayi-Dopemu <rodopemu@gmail.com> - 2013-08-03 10:29 -0700 Re: Java compilers Arne Vajhøj <arne@vajhoej.dk> - 2013-08-03 13:37 -0400 Re: Java compilers Marcel Müller <news.5.maazl@spamgourmet.org> - 2013-08-03 20:01 +0200 Re: Java compilers lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-08-03 20:05 +0100
csiph-web