Skip to content

Comment on Low-Level Software Security for Compiler Developersparent

Comments

The vast majority of businesses choose speed over security

I would add that the vast majority of businesses also choose features over speed.

In some cases they pay lip service to speed, for instance by choosing C++, but pay zero attention to actual speed, because they end up writing in a pointer fest RAII style that destroys memory locality and miss the cache all the time. Compared to that, even Electron doesn’t look too unreasonable.

If they write bad and slow Cpp code surely their Electron code will be even slower?

It depends. The main reasons C++ code can be slow are costly abstractions (don't laugh!), inappropriate data structures, and pointer fest (that leads to cache misses).

Writing the same program in JavaScript won't change much of the above. You'll have the JIT overhead for sure, but the basic data structures will remain relatively efficient, and if you're starting out with a pointer fest it won't be any worse in JavaScript. As for the GUI itself, well… I expect it'll be as fast as any browser.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.