Were you maybe using Python on AWS Lambdas? That would be relatively slow, since it takes away the advantage Python/Flask would have vs PHP...that it's already warm.
In PHP 7.4 PHP can be configured to precache (typically framework) files. Thus with mod_php (as opposed to FPM), Apache and the Zend engine are already warm.