Menu

1 / 7

Introducing bytecode caching for Vercel Functions

Vercel News·Javi Velasco·5 months ago
#edDozyvn
#vercel#bytecode#cold#start#cache
Reading 0:00
15s threshold

We recently shipped a new Rust-based core for Vercel Functions to improve startup times.

Today, we are announcing a new experimental feature to further reduce startup latency for large applications, resulting in up to 27% faster cold starts .

Link to heading Introducing bytecode caching

One of the slowest parts of a cold start is loading and compiling the JavaScript source code. Before executing the code, it needs to be parsed and compiled into bytecode , which is then directly executed by the V8 virtual machine or compiled into machine code by V8's just-in-time compiler (JIT).

This conversion to bytecode must happen when a JavaScript file is executed for the first time, but it introduces latency.

What if we could cache this step and re-use it later on subsequent cold starts?

Before: the JavaScript is compiled to bytecode on every cold start.

That's exactly how bytecode caching works.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.