Skip to main content

Python function bundles now include precompiled bytecode

By Steven Van ·

Vercel now precompiles Python functions to bytecode at build time, cutting median cold starts from 2.8s to 1.3s in its own benchmarks.

Vercel now compiles Vercel Python functions to bytecode at build time, including both application code and dependencies, and packages the resulting .pyc files into the function bundle. Skipping that compilation step at startup cut cold starts for the median-sized function from 2.8s to 1.3s in Vercel's benchmarks, according to the Python runtime documentation.

Cold starts are already rare in practice: pre-warmed instances keep at least one function instance active for production deployments on paid plans, and automatic concurrency scaling limits how often new instances start cold. Vercel fits as much precompiled bytecode into a bundle as space allows, so functions near the size limit see smaller gains. No code changes are required.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read Python function bundles now include precompiled bytecode on Creators Toolbox