I have code which reads vast numbers of dates in 'YYYY-MM-DD' format. Parsing all these dates, so that it can add one, two, or three days then write back in the same format is slowing things down quite considerably.
3214657 14.330 0.000 103.698 0.000 trade.py:56(effective)
3218418 34.757 0.000 66.155 0.000 _strptime.py:295(_strptime)
day = datetime.datetime.strptime(endofdaydate, "%Y-%m-%d").date()
Any suggestions how to speed it up a bit (or a lot)?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…