3 ms·
The v8 engine behind Atom is an incredibly efficient compiler, a just-in-time compiler. Without it, all current JS interfaces would be comically slow. The pro
by nine_k 9y ago
The v8 engine behind Atom is an incredibly efficient compiler, a just-in-time compiler. Without it, all current JS interfaces would be comically slow.
The problem with JS is that its execution model is built around highly dynamic features that are hard to compile efficiently. It also lacks a nice type system, though Typescript helps a lot.
The problem with Atom performance, I suspect, is mostly with its using a web browser and DOM to exit text. I bet that elisp is seriously slower than JS on v8, but Emacs is faster than Atom, because its presentation layer is more efficient (while less capable).
- petre 9y agoMost of them are slower. Luajit is the only dynamic language runtime that's faster than V8, at least at prime number crunching. I haven't tested elisp but the others (Perl, Ruby etc.) are an order of magnitude slower.
- flavio81 9y ago>Luajit is the only dynamic language runtime that's faster than V8, Also Common Lisp (much faster than V8), Forth, and probably some Scheme implementations.
- nine_k 9y agoTo pick nits: Forth is not "dynamic"; words are called by their direct addresses, without any hashtable lookup. It's a stark contrast with Python, Ruby, JS, etc.
- klibertp 9y agoTo be fair, with CREATE/DOES> you can make them do any lookup you want easily. Well, as easy as anything in Forth.
- rattray 9y agoHmm, VSCode uses a web browser (and I think also the DOM) to display/edit text, and I find it to be perfectly snappy (Atom was unusably slow on my work codebase).
- maximilianroos 9y agoVSCode uses a Canvas layer, which allows it to skip some of the steps that slow down Atom's rendering https://code.visualstudio.com/blogs/2017/10/03/terminal-renderer https://code.visualstudio.com/blogs/2017/10/03/terminal-rend...
- JPKab 9y agoGitHub doesn't do desktop software. Msft does. I'm assuming that is a big reason why they have a big performance boost.