# Why does unreached code take linear time?!?

**URL:** <https://discuss.python.org/t/why-does-unreached-code-take-linear-time/33295>\
**Category:** Python Help\
**Created:** [September 8, 2023, 12:55pm UTC](https://discuss.python.org/t/why-does-unreached-code-take-linear-time/33295 "2023-09-08T12:55:29Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![jamestwebber](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jamestwebber/32/12799_2.png) [@jamestwebber](https://discuss.python.org/u/jamestwebber)\
**Post date:** [September 8, 2023, 6:48pm UTC](https://discuss.python.org/t/why-does-unreached-code-take-linear-time/33295/19 "2023-09-08T18:48:27Z")

</div>

the things I do\[1\]…

On a debian11 VM on GCP:

```auto
mamba create -n py310 python=3.10
mamba create -n py311 python=3.11
mamba activate py310
python unreached_test.py
mamba deactivate
mamba activate py311
python unreached_test.py

```

outputs:

```auto
(py310) jupyter@fluent-analysis ~$ python unreached_test.py 
 142.3 ± 0.1 ns short
 161.2 ± 0.1 ns long

 150.4 ± 0.3 ns short
 166.4 ± 0.1 ns long

 150.7 ± 0.1 ns short
 167.0 ± 0.2 ns long

Python: 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]

```

and

```auto
(py311) jupyter@fluent-analysis ~$ python unreached_test.py 
 176.8 ± 0.3 ns short
 643.3 ± 0.4 ns long

 176.0 ± 0.4 ns short
 644.0 ± 0.3 ns long

 176.5 ± 0.4 ns short
 644.7 ± 0.6 ns long

Python: 3.11.5 | packaged by conda-forge | (main, Aug 27 2023, 03:34:09) [GCC 12.3.0]

```

So this definitely is new to 3.11, although something is different in 3.10 as well…

* * *

1. to avoid work

---

_[View the full topic](https://discuss.python.org/t/why-does-unreached-code-take-linear-time/33295)._
