"sam is typing..."

(A Blog by Sam Marshall)

Vroom Vroom

2018 03 02

I was reading an article about JavaScript Performance, and it made me think about how I have no clue how v8 works on the most basic level (or, in fact, any other javascript engine...).

I mean, I know how it works in a vague sense, like parsing, tokenizing, execution, byte code, optimisation, JIT, stuff. I couldn't implement it or owt, but hey - I know that they are things, and they may be related to how v8 works inside. At a higher level, though, no clue. I don't know how ot take a file of javascript code and get v8 to run it. No idea at all.

I feel like this is worth knowing, even just out of interest. It means I don't know how node works, I don't know how C extensions work. I always say that I don't like ✨ magic ✨ in my code, but I always realise if I think about it enough, it's all magic to me. I don't know how any of it fits together in practical terms. I guess this is abstraction and encapsulation at work, which is fantastic...but also, I want to understand everything you know?

Maybe I'll find out.