Hacker News new | comments | show | ask | jobs | submit login
Ask HN: Does native compilation still matter?
23 points by mobiletelephone 10 days ago | hide | past | web | 17 comments | favorite
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?





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.


> 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.


If that was the case, why do C and C++ occupy the second and third positions on the Tiobe Index? [0]

C++ still tends to be king when it comes to games, especially when you start talking about the console market. [1][2][3]

Finally, punch C++ into whoishiring.io. Be amazed at the market.

[0] https://www.tiobe.com/tiobe-index/

[1] https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/devel...

[2] https://www.phoronix.com/scan.php?page=news_item&px=MTU1MTY

[3] http://news.softpedia.com/news/unreal-engine-4-15-brings-nin...


I didn't say that C and C++ weren't popular languages. I said that C and C++ don't constitute a majority of software development anymore.

Regarding games: (1) there are very few game developers relative to the total number of software developers out there; (2) a lot of game development is done in Unity, with C#.


> C and C++ don't constitute a majority of software development anymore.

So, to get this straight, the premise you are pushing, is that languages that are less popular with "... number of skilled engineers world-wide", now constitute the majority of software development?


I mean exactly what I said.

If you look at the TIOBE index, for instance, C and C++ together have less share than Java alone.


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.


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

Again, I didn't say that C and C++ weren't popular languages.

> Nowadays, the amount of high-level software written as a ratio of total programmer-hours is probably upwards of 90%.

What makes this an appropriate metric? What about, for example, the ratio of total user interaction time?

The lower layers of the stack may not need as much programming attention compared to the top of the stack, but that's only because the stack is top-heavy in terms of programs produced.

But in a given stack, the set of applications at the top of the stack is still not particularly big (most users do not use most applications). On the other hand, everything that users do passes through the lower parts of the stack (most users use the kernel, drivers and the graphics layer constantly, even if indirectly).


The context of 'Matters' in this case is as an important part of the industry.

Fortran and Cobol are still extremely heavily used on the servers of many slow moving institutions (banks and the like). Regardless of how many cpu cycles they consume they don't matter in the field of software development.

Some low level tech will always be in the stack, but it doesn't mean it's an important part of the field. It will be relegated to a critical yet niche area of programming.


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.

What do you think of Rust?

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.


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.


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

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



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: