[pypy-commit] pypy default: Made these lists have the IntegerListStrategy so datetime will be microscopically faster
alex_gaynor
noreply at buildbot.pypy.org
Thu Aug 29 21:10:55 CEST 2013
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r66430:fa83d625fabf
Date: 2013-08-29 12:10 -0700
http://bitbucket.org/pypy/pypy/changeset/fa83d625fabf/
Log: Made these lists have the IntegerListStrategy so datetime will be
microscopically faster
diff --git a/lib_pypy/datetime.py b/lib_pypy/datetime.py
--- a/lib_pypy/datetime.py
+++ b/lib_pypy/datetime.py
@@ -40,9 +40,9 @@
# for all computations. See the book for algorithms for converting between
# proleptic Gregorian ordinals and many other calendar systems.
-_DAYS_IN_MONTH = [None, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
+_DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
-_DAYS_BEFORE_MONTH = [None]
+_DAYS_BEFORE_MONTH = [-1]
dbm = 0
for dim in _DAYS_IN_MONTH[1:]:
_DAYS_BEFORE_MONTH.append(dbm)
More information about the pypy-commit
mailing list