A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/059276.html below:

[Python-Dev] When do sets shrink?

[Python-Dev] When do sets shrink? [Python-Dev] When do sets shrink?Fredrik Lundh fredrik at pythonware.com
Thu Dec 29 17:17:46 CET 2005
Noam Raphael wrote:

> I'm not saying that practically it must be used - I'm just saying that
> it can't be called a heuristic, and that it doesn't involve any "fancy
> overkill size hinting or history tracking". It actually means
> something like this:
> 1. If you want to insert and the table is full, resize the table to
> twice the current size.
> 2. If you delete and the number of elements turns out to be less than
> a quarter of the size of the table, resize the table to half of the
> current size.

sure sounds like a heuristic algorithm to me... (as in "not guaranteed to
be optimal under all circumstances, even if it's probably quite good in all
practical cases")

</F>



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4