Message208211
> 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. |
|
Date |
User |
Action |
Args |
2014-01-15 23:00:24 | vstinner | set | recipients:
+ vstinner, gvanrossum, pitrou, yselivanov |
2014-01-15 23:00:24 | vstinner | set | messageid: <1389826824.65.0.0105889429075.issue20275@psf.upfronthosting.co.za> |
2014-01-15 23:00:24 | vstinner | link | issue20275 messages |
2014-01-15 23:00:24 | vstinner | create | |
|