STINNER Victor added the comment:

> With debug code the execution time is around 2.8-3.1s, with debug comment 
> commented out it's around 2.3-2.4s.

Wow, that's impressive that such minor syscalls can take so much times!

I modified your script to repeat the test 5 times and take the minimum timing:

* Python 3.4 original: 3.83 seconds
* asyncio without timing log: 2.79 seconds (27% faster)

27% faster is not a "premature" optimisation :-)

By the way, Linux provides faster clocks like CLOCK_MONOTONIC_COARSE:

   A  faster  but  less  precise version of CLOCK_MONOTONIC.
   Use when you need very fast, but not  fine-grained  time‐
   stamps.

Python doesn't expose these clock identifiers yet: #14555.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20275>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to