[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-04 Thread Paul Ganssle
Paul Ganssle added the comment: Yeah, I knew this was slower and it's been on my long list to look at it (tied to this is the fact that `datetime.today()` is basically just a slow version of `datetime.now()`, in defiance of user expectations). My inclination is that we shouldn't

[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-04 Thread Ruairidh MacLeod
Change by Ruairidh MacLeod : -- nosy: +rkm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-03 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-03 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44307] date.today() is 2x slower than datetime.now().date()

2021-06-03 Thread Anthony Sottile
New submission from Anthony Sottile : ```console $ python3.10 -m timeit -s 'from datetime import datetime' 'datetime.now().date()' 50 loops, best of 5: 708 nsec per loop $ python3.10 -m timeit -s 'from datetime import date' 'date.today()' 20 loops, best of 5: 1.4 usec per loop ```