Hi,

My idea is to set the starting point for itertools.product()
<https://docs.python.org/3.6/library/itertools.html#itertools.product>
since it becomes very slow if the point of interest is in the middle. For
example when working with datetime tuples with seconds resolution (worst
case, milli/microseconds), you need to skip a lot of items.

There are several methods I have tried as an alternative but
itertools.product() is the fastest:
- datetime and timedelta
- naive looping

This is where I applied it but the issue at seconds resolution is still a
bottleneck:
https://github.com/Code-ReaQtor/DocCron/blob/1.0.0/doccron/job.py#L171

Setting the starting point might come in handy if we want to skip several
data.
What do you think?

Best Regards,
Ronie
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to