Hacker News new | ask | show | jobs
by floatrock 4152 days ago
> People today have no concept of how much computing power is wasted as excess heat because of modern software development practices.

Or of how many new ideas are created because generous power/space ratios give us the luxury to develop quickly using abstractions higher than highly-optimized references and pointers. You can take a hit on optimal energy efficiency if it results in a larger ecosystem with more possibilities.

The real challenge is to get both.

2 comments

But high level languages do not require VMs. Time for a rant.

We were lead down a collective rabbit hole by rabid VM and JIT enthusiasts. Notice the absence of those extolling the benefits of JIT compilation today. People used to claim that at some point Java would consistently outperform C due to the greater number of optimisations available to a JIT compiler. They've all become silent because it's quite obviously a load of baloney.

The irony is that we had the answer all the time, but nobody wanted to believe it.

Back in the day, languages like Haskell, early C++, early Objective-C and Scheme compiled to C. Compiling to C was great! No need to spend man-centuries building an optimising cross-compiler to compete with GCC (and fail), no need to screw around with GIMPLE.

In 2015, compiling to a mid-level language is back in style. Except we don't call it C, we call it LLVM-IR. If you squint it's the exact same thing we were doing 15+ years ago.

LLVM-based languages that look like Rust and Swift will eventually dominate, because they are universal. You can use Rust for the lowest level embedded programming. You can use Swift for the highest level architecture astronautics.

What is depressing is that we could have built them 15 years ago but we were too busy fannying around with a dead-end technology.

Also code produced by LLVM-based languages can be linked with low-level modules written in pure C/C++, or even assembly, if necessary. So one may quickly prototype and then slowly rewrite the software for performance, module by module. No such thing is possible for JIT-based languages or platforms.
As an embedded engineer, you and parent have put into words something that I've known but haven't been able to articulate.

I think I encountered the sentiment (on HN) before that because CPU and memory speeds have become so far out of whack and that increasing CPU speeds have power limits that engineers will start having to worry about optimization more and more. I suppose the difference is that before, we didn't have the boat-loads of memory that we have now (in a system).

In other words, yay for LLVM IR!

But I think it is energy efficient already. The modern smartphone replaces the radio, tv, newspaper, store, school, workplace, you don't need a clock, a walkman or a map any more. All o these consumed energy or cost money to buy and are heavy to carry around.