On Fri, Sep 20, 2019 at 6:31 AM Richard Higginbotham <higgi...@gmail.com> wrote:
>
> That's exactly what I expected. It's the opposite though. The time to check 
> one list for all the elements in another list was far longer. Granted this 
> was a Linux box using ext2. The other helpful element is that the filesystem 
> returned the files in the proper order. One of the tests runs I mentioned was 
> A 100000, B 500000 because that was a realistic scenario. If you actually try 
> that with the naive method you will be waiting for a very long time to get a 
> result, even today. Using sets, if you know to use sets, then its only a 10th 
> of a second. I think both those methods are polynomical run time so I was 
> pretty proud of my linear solution at the time.
>

Please quote some text to give context. WHAT is exactly what you expected?

Building a set out of a series of values takes linear time, and set
intersection also takes linear time. On what basis do you say that
"both these methods" (again, not sure what you're referencing since
you didn't quote any text) have polynomial run time?

ChrisA
_______________________________________________
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/YO3WIOJNVIRG4C7UL5UHLSTAS4OH4GL5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to