DEV Community

Cover image for JS compiled language
GiandoDev
GiandoDev

Posted on

2

JS compiled language

The history teaches us that the compiler processes the code in three stages:

Lexing

Alt Text
As in the image above, in this phase, we convert our program into meaningful tokens.

Parsing

Here we take a stream of tokens (array) and trasform it into an abstract syntax tree called AST that represent the grammatical structure of the program.
Alt Text

Code Generation

Here JavaScript convert AST into a set of machine instruction.
Between parsing and code generation, JavaScript optimizes performance, execution and does also other cool stuff, all in a millisecond.
If you want take time to understand JavaScript engines look this awesome video from JS config Franziska Hinkelmann
Alt Text

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay