5 ms·
> The higher the language is, the slower it is. That’s why C and C++ are so much faster, they’re very close to the machine code language: the assembly language.
by saagarjha 6y ago
> The higher the language is, the slower it is. That’s why C and C++ are so much faster, they’re very close to the machine code language: the assembly language.
Wait until you see Rust ;)
> That means that new properties can be added, replaced and removed during execution time. This is not possible with languages like Java, for example, in which everything (classes, method, objects and variables) must be defined before program execution and can’t be dynamically changed after the app starts.
Nit: they can; this is just not normally done
> At the time of writing this article, the GitHub repo counts 15.3k stars and 2.9k forks.
Note that V8 is developed mostly outside of GitHub.
- microcolonel 6y ago> Wait until you see Rust Rust is still just a really nice macro assembler.
- lachlan-sneff 6y agoErr, what?
- entha_saava 6y agoLike every compiled language :/
- lisper 6y ago> Wait until you see Rust ;) Or Common Lisp. Or OCaml. Or Haskell. Or Dylan. Or...
- adamnemecek 6y agoThose are all higher languages however they are slow.
- lisper 6y agoNo, they aren't. That's the whole point. This idea that high level languages are slow is a pernicious myth.
- adamnemecek 6y agoHow can say lisp, a language that touches the heap profusely, be faster than c or rust?
- uryga 6y agoi've heard a lot about SBCL and the efficient machine code it generates. i'm guessing a lot of the heap stuff can be optimized away if the code is written right (e.g. via escape analysis or eliminating intermediate values). though i'm guessing that if you really want the best performance, you just end up writing C/Rust with a lot of parentheses :)
- lisper 6y agoYou have to compare apples and apples. Lisp can "touch the heap profusely" but it doesn't have to. You can trade off programming convenience for heap touching. But GC technology has come a very long way, and GC's optimized for Lisp's particular pattern of heap touching have become exceptionally good. Such technology is now standard equipment in EVERY language EXCEPT C and C++, and even C and C++ have them as bolt-on accessories. For some kinds of tasks, Lisp can actually be faster than C or C++. This is why, for example, the Orbitz search engine was written in Common Lisp.
- adamnemecek 6y agoOK can I see some numbers?
- lisper 6y agoSure. What kind of numbers would you like to see?