Hacker News new | ask | show | jobs
by slackingoff2017 3337 days ago
Can we just compile js to bytecode? It's silly making huge apps in a language that has to be parsed and compiled on the fly
2 comments

That would reduce largely the JavaScript runtime size, but not the rendering engine and all the vendored third-party libraries.

On my Arch Linux installation, the node.js package takes about 18.45 MiB on disk. While I'd be glad if the various multiple electron runtimes slimmed down by 10-15 MiB, it wouldn't be much.

Get to work on a Webassembly compiler and your wish might be granted.

http://webassembly.org

The Tanks demo makes my CPU hurt (15" rMBP, Firefox).

Why is WebGL still so heavy on the CPU?

It works fine on my 2011 15" macbook pro with Firefox 54.0b4. I wonder if it is the high retina resolution thats the problem for you?
It might be because the macbook is also driving a 4k display at the same time.
It takes up about 2 percent of my 7 year old cpu in chrome. It is also compiled from Unity, so was not made from C++ directly.
Apple's OpenGl support is crap.
> Why is WebGL still so heavy on the CPU?

Well, how else are we supposed to get nice side channel / timing attacks?