points by orangeboats 2 days ago | 0 comments
My point was that while you can implement any performant program (be it V8 or Spidermonkey, Blink or Servo) in any language, the effort required to reach a certain performance level differs between the languages.
>v8 is fast because it emits assembly
It emits machine code afaik. And secondly, do you _really_ want to implement the intermediate layers of a JIT in assembly?
[–] MobiusHorizons 1 day ago
[–] orangeboats 1 day ago
You don't seem to know where the machine code are generated from. A big part of a compiler is optimizing intermediate representations of the source code.
I am not going to waste my time with you.
However the point I was trying to make is still relevant I think, which is that machine instruction abstraction layer (whether it is serialized as binary machine code or as assembly text) remains a critical piece of what makes high performance software fast even today.
There is a recurring myth I see on HN that suggests abstraction layers are progressive, as though humanity had evolved past the assembly/machine instructions abstraction layer to C to higher level languages leaving lower abstraction layers behind completely. That is simply untrue, and a project like V8 is actually a great example of this, since it not only will have hand tuned assembly routines, but also needs to ship a bespoke compiler which will emit machine instructions.
So even though it’s true we don’t organize our software with assembly language, it remains a key to performance. It could be a custom JIT compiler, hand tuned SIMD code (eg to handle string parsing), or even just checking what the compiler emitted (eg in compiler explorer). Machine instructions remain key to high performance.