
Ask HN: Does native compilation still matter? - mobiletelephone
Have we reached the point where the overhead of a VM is acceptable for 99% of applications? Will native code become the domain of a few experts who write higher level environments used by the majority of programmers?
======
gizmo
Of course it still matters. Almost all the software that runs whichever device
you're reading this post on has been compiled to machine code. In operating
systems everything from the filesystem to device drivers to the window manager
to the web browser are written in some low level language. For hard real-time
systems you need to be close to the metal. Same for most embedded
applications.

Sure, there are many situations where sacrificing performance in exchange for
a VM is totally appropriate. If you think this covers 99% percent of
applications (or even 50%!) then you may only be thinking of a very small
subset of software development.

Also, inefficient code produces excess heat. Meaning reduced battery life and
noisy fans. So all software that gets used a lot should be optimized for
performance just to conserve energy.

~~~
pcwalton
> If you think this covers 99% percent of applications (or even 50%!) then you
> may only be thinking of a very small subset of software development.

This statement was true in the '90s. Nowadays, the amount of high-level
software written as a ratio of total programmer-hours is probably upwards of
90%.

Out of the hundreds of thousands of programmers out there, very few of them
write kernels or drivers. Even fewer write window managers—there are maybe a
dozen of them in active use, and most of them have either zero or one
maintainers. Four software companies, out of thousands and thousands, write
Web browser engines; two of them share most of their engines' code. With few
exceptions, all of the codebases I mentioned date back to the '80s or '90s,
when most of the code was written.

People seem to think that the software stack on a typical desktop OS is
constantly under heavy development. It's not. Most of it is in maintenance
mode or effectively unmaintained.

Don't take my word for it—look at the "who is hiring" threads on HN lately.
There's some C++ in there, sure, but nowhere near the figure you quoted.

~~~
ferdterguson
Totally ignores scientific applications, which there aren't enough
supercomputing hours to go around for. NERSC's Cori, one of the top 3
supercomputers in the world, often takes a day to start a job.

Not to mention private companies developing software to analyze heaps of data
from finance to web searches.

~~~
Something1234
What's your source for it and why would it take so long?

------
psyc
I don't generally want to give up performance. As a game developer, I usually
actually need all the performance I can get. My default choice is always a
language with nice, low-cost abstractions, that compiles to native code. I
don't see that changing, probably ever. I always want to get the most out of
the machine.

~~~
meric
What do you think of Rust?

------
soulbadguy
Interesting question, but ultimately it's still hard to say .

The story on power consumption of managed/VM language is still not clear. Most
of the computation in the world are now happening in mobile/IoT devices and
cloud/data centers; Both environment put a strong constraint on power
consumption and therefore on efficiency. There is already a huge amount (and
growing ) of native code running in the cloud. As our computational
requirement increase (and unless we have a break through in computation
efficiency) people might want to revisit the lost implied by managed
environment.

The other side of the coin is that managed env. are popular because they
usually bring safety, ease of programming and productivity. Modern C++,rust
and D are showing that a lot of those attributes can be had with native
languages too.

------
bjourne
Yes we have. The majority of all commercial programmers work with web sites or
web applications in which VM:s reign supreme.

But for hobbyist work, it is different. Free software developers are seeking
universality more than anything else. They want as many people as possible to
be able to use their code, be able to read it and contribute to it.

VM:s hinder universality. For example, if you write an image processing
library in C then everyone can theoretically use it (assuming bindings are
non-trivial to write). But if the same library is written in a VM language,
then it is only usable to developers who are using that platform.

It's like a curse.

------
otempomores
As long as the man hours invested cost less then a more potent cpu in all
devices sold

------
seanwilson
With many dynamic languages having ahead-of-time and just-in-time compilation
it's a murky question now.

