Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901; t=1352854794; bh=hZvmBN3hI91ROf/MI2HWKEuvwbp63r3J9nvxJxfslIc=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=gwzc8s7fVLTga2/ksvYpiWWDmXKPxgEFB37mzRvPtNAUmWvYh1bf3fpt63lAFfhj3 8oJEf8+Rkhq7NQ7i33Mv8OBpWfuMMkj1Sa0ZsVa/+oL+A19HcMXbqiXD2CafN+7GnZ 6oulfpkXWcLCz62EN6NLaesRcHfTTrzBWbAbwjuI= Date: Wed, 14 Nov 2012 01:59:53 +0100 From: Christian Heimes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: Richard Baron Penman Subject: Re: Generate unique ID for URL References: <0692e6a2-343c-4eb0-be57-fe5c815efb99@googlegroups.com> <133e0be5-63af-4f72-9d0a-c59b04aa4ce4@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 8 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352854794 news.xs4all.nl 6867 [2001:888:2000:d::a6]:40522 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33281 Am 14.11.2012 01:41, schrieb Richard Baron Penman: > I found the MD5 and SHA hashes slow to calculate. > The builtin hash is fast but I was concerned about collisions. What > rate of collisions could I expect? Seriously? It takes about 1-5msec to sha1() one MB of data on a modern CPU, 1.5 on my box. The openssl variants of Python's hash code release the GIL so you use the power of all cores.