Andrew Barnert wrote:
> On Sep 19, 2019, at 19:18, Richard Higginbotham higgi...@gmail.com wrote:
> > It's not really constant though.
> > It’s really hard to have a discussion when all of your posts are all 
> > replies, but
> you don’t give us any clue what you’re replying to. There are multiple 
> responses from
> multiple people since your last email, each with multiple paragraphs covering 
> multiple
> subjects. So I have no idea what “it” refers to. Or what “though” is 
> challenging.
I'm just trying to respond to everyone using the mail.python.org interface. 
I'll use the quote function to make it clearer (I hope).

> But I think what you’re trying to do is argue that hash tables don’t work.
No, I think I provided experimental evidence to show that there is a time cost 
for looking up hashes and that can increase when the size of the tables 
increase. Where that actually comes from internally doesn't really matter. You 
have to execute that constant hash for every item in the A set. If you can 
computer your hash in 1 picosecond that is still len(A) * 1 picoseconds at best 
and theoretically only. 
The numbers I referenced above with 0.3ms versus 0.5 ms could lead one to think 
that it's not just a factor of the size of A. That could be due to how timit 
does things or many other factors. So of course I'm wondering if that is also 
impacting my routines. Or it is related to the difference between C and pure 
python. I'm not just scoffing that it doesn't match what I want.

The number of values in A is the limiting factor for set operations. That's why 
I didn't use large values for A and small values for B. Past that the time it 
takes to make a set from a list is the other limiting factor. I'm not proposing 
to replace the set library. If the user has two sets use the set functions, 
they are plenty fast. If the user doesn't have sets then my list functions are 
faster than converting to sets and then back again, at least after the size of 
the lists has reached some threshold.
_______________________________________________
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/QRY6QFPE2RMRRK7IU4U7FSNAABXMI7YS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to