This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients gvanrossum, pitrou, vstinner, yselivanov
Date 2014-01-15.23:00:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389826824.65.0.0105889429075.issue20275@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-01-15 23:00:24vstinnersetrecipients: + vstinner, gvanrossum, pitrou, yselivanov
2014-01-15 23:00:24vstinnersetmessageid: <1389826824.65.0.0105889429075.issue20275@psf.upfronthosting.co.za>
2014-01-15 23:00:24vstinnerlinkissue20275 messages
2014-01-15 23:00:24vstinnercreate