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.