[Python-Dev] PEP 564: Add new time functions with nanosecond resolution

Nick Coghlan ncoghlan at gmail.com
Sun Oct 22 11:36:41 EDT 2017

On 23 October 2017 at 01:06, Wes Turner <wes.turner at gmail.com> wrote:

> On Saturday, October 21, 2017, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> So yeah, for nanosecond resolution to not be good enough for programs
>> running in Python, we're going to be talking about some genuinely
>> fundamental changes in the nature of computing hardware, and it's currently
>> unclear if or how established programming languages will make that jump
>> (see [3] for a gentle introduction to the current state of practical
>> quantum computing). At that point, picoseconds vs nanoseconds is likely to
>> be the least of our conceptual modeling challenges :)
> There are current applications with greater-than nanosecond precision:
> - relativity experiments
> - particle experiments
> Must they always use their own implementations of time., datetime.
> __init__, fromordinal, fromtimestamp ?!
Yes, as time is a critical part of their experimental setup - when you're
operating at relativistic speeds and the kinds of energy levels that
particle accelerators hit, it's a bad idea to assume that regular time
libraries that assume Newtonian physics applies are going to be up to the

Normal software assumes a nanosecond is almost no time at all - in high
energy particle physics, a nanosecond is enough time for light to travel 30
centimetres, and a high energy particle that stuck around that long before
decaying into a lower energy state would be classified as "long lived".


P.S. "Don't take code out of the environment it was designed for and assume
it will just keep working normally" is one of the main lessons folks
learned from the destruction of the first Ariane 5 launch rocket in 1996
(see the first paragraph in
https://en.wikipedia.org/wiki/Ariane_5#Notable_launches )

Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171023/ecef16e3/attachment.html>

More information about the Python-Dev mailing list