Latency dependence on server Python version

Continuing the discussion from Latency dependence on geographical location:

I was wondering how much the server Python version would affect server round-trip time. In particular, I was hoping the Python 3.10 runtime, especially the Minimal variant, would be faster than the original Full Python 3. (Spoiler: it’s not.) So I cloned the app from the thread linked above and varied only the Python version. My results (all from America/Chicago):

Basic Python 3 (original): the first round trip took 0.689 s. The subsequent 5 round trips took 0.225 s on average…
Full Python 3: the first round trip took 0.704 s. The subsequent 5 round trips took 0.268 s on average…
Python 3.10 (Beta) - Minimal: the first round trip took 1.413 s. The subsequent 5 round trips took 0.630 s on average, with a min of 0.434 s and max of 0.715 s.
Python 3.10 (Beta) - Standard: the first round trip took 1.063 s. The subsequent 5 round trips took 0.557 s on average, with a min of 0.492 s and max of 0.657 s.
Python 3.10 (Beta) - Data Science: the first round trip took 1.158 s. The subsequent 5 round trips took 0.654 s on average, with a min of 0.541 s and max of 0.742 s.

Note: The Python 3.10 (Beta) versions took ~10s to start the Python runtime on the very first run after switching versions. The times shown above are from a subsequent run.

From anecdotal observation, retrying each a few times, the Basic Python 3 seems to be consistently faster than the Full Python 3, and the Python 3.10 (Beta) versions are clearly slower than those two. But the ordering among the three Python 3.10 versions is inconsistent.

5 Likes

Related: