On Sep 19, 2019, at 13:18, Richard Higginbotham <higgi...@gmail.com> wrote:
>>> For example are the file names in A in B and if so return a new list with >>> those items. Long story short, I wrote some functions to do that. They are >>> quite simple and fast (due to timsort in no small part). >>> Even the plain python code is faster than the built in set functions >>> (afaik). >> You’re testing pretty small values in a very narrow use case, and testing >> them inaccurately by using datetime instead of timeit (the fact that some of >> your results are 0 vs. 0 should be a clue…), and you haven’t even given us >> the results, just claimed that > they’re faster. > > I'm sorry I haven't used the mail list before and didn't send my comments to > the list. Please see my response to Chris for some example times. I'm > reluctant to use anything less than about a ms for timing purposes. There's > too many interactions at the us level that can skew results. This is exactly what timeit is for. It repeats the tests multiple times and aggregates appropriately, and it does half a dozen other things that you haven’t even thought of and therefore aren’t even trying to correct for. And of course it’s been tested through decades of widespread use. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/SX3VKDSAVY7X7WYSO2ZBDOWIOKAY72S5/ Code of Conduct: http://python.org/psf/codeofconduct/