Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71924
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'that?': 0.05; 'explicit': 0.07; 'string': 0.09; 'arrays': 0.09; 'subject:keys': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '23,': 0.16; 'adam': 0.16; 'dict': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hashes': 0.16; 'lookups': 0.16; 'simplicity.': 0.16; 'subject: \n ': 0.16; 'subject:sqlite3': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'bonus': 0.22; 'cc:addr:python.org': 0.22; 'byte': 0.24; 'integer': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'involving': 0.30; 'message- id:@mail.gmail.com': 0.30; 'equality': 0.31; 'fri,': 0.33; 'guess': 0.33; 'subject: (': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; 'though,': 0.39; 'to:none': 0.92 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=MlHFEOXIJuH8zUlL1vBF3ilrCIfVvmXRIyi5dA7vV/Q=; b=cuWc50tO5xYbvEwD7wNGPAxEmL7mUeyx5pZHxKUFKAXQiBjAX1DNcIDp6B3o5LU73R 5ePwv3TFAMg49yNK79rsbYSHoTtvSoxbwcZ5z2ugPAq1HFu/B6ssMKQVWvt7jw/QLF2/ NWlhaCGvrr2xqZ2tOu1rsa7F2Z7iZYgXuG2MG8ngZIFfijUp1BzOU5Q4x6rGZCU4SDdW bwReKrBWwBsMG+soDGPa6phLWzedTzIn9meWBVeqKZhKmFK9u8Do0Zr9323rkPCONPPE ik6gU4pYAaFjd3zTVdlp+bBc3DwWATop5AZ4wL7VDk1x8anmsDbDd8X7u0gi6snJlrFi uKxA== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.104.7 with SMTP id ga7mr2928501vdb.29.1400842770202; Fri, 23 May 2014 03:59:30 -0700 (PDT) |
| In-Reply-To | <sck35bxdc5.ln2@news.ducksburg.com> |
| References | <jn415bx6uf.ln2@news.ducksburg.com> <mailman.10220.1400764235.18130.python-list@python.org> <05c15bxrpj.ln2@news.ducksburg.com> <mailman.10223.1400768058.18130.python-list@python.org> <k9f15bxoql.ln2@news.ducksburg.com> <mailman.10225.1400772863.18130.python-list@python.org> <sck35bxdc5.ln2@news.ducksburg.com> |
| Date | Fri, 23 May 2014 20:59:30 +1000 |
| Subject | Re: hashing strings to integers (was: hashing strings to integers for sqlite3 keys) |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10239.1400842778.18130.python-list@python.org> (permalink) |
| Lines | 11 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1400842778 news.xs4all.nl 2846 [2001:888:2000:d::a6]:41294 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:71924 |
Show key headers only | View raw
On Fri, May 23, 2014 at 8:27 PM, Adam Funk <a24061@ducksburg.com> wrote: > I've also used hashes of strings for other things involving > deduplication or fast lookups (because integer equality is faster than > string equality). I guess if it's just for deduplication, though, a > set of byte arrays is as good as a set of int? Want a better way to do that? Use a set or dict and let Python do the hashing. It'll be every bit as fast as explicit hashing, plus you get the bonus of simplicity. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 12:47 +0100
Re: hashing strings to integers for sqlite3 keys Peter Otten <__peter__@web.de> - 2014-05-22 14:58 +0200
Re: hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 14:41 +0100
Re: hashing strings to integers for sqlite3 keys Chris Angelico <rosuav@gmail.com> - 2014-05-23 00:08 +1000
Re: hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 15:40 +0100
Re: hashing strings to integers for sqlite3 keys Chris Angelico <rosuav@gmail.com> - 2014-05-22 23:03 +1000
Re: hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 14:47 +0100
Re: hashing strings to integers for sqlite3 keys Tim Chase <python.list@tim.thechases.com> - 2014-05-22 08:09 -0500
Re: hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 14:54 +0100
Re: hashing strings to integers for sqlite3 keys Chris Angelico <rosuav@gmail.com> - 2014-05-23 00:14 +1000
Re: hashing strings to integers for sqlite3 keys Adam Funk <a24061@ducksburg.com> - 2014-05-22 15:47 +0100
Re: hashing strings to integers for sqlite3 keys Chris Angelico <rosuav@gmail.com> - 2014-05-23 01:09 +1000
Re: hashing strings to integers for sqlite3 keys Peter Otten <__peter__@web.de> - 2014-05-22 17:34 +0200
hashing strings to integers (was: hashing strings to integers for sqlite3 keys) Adam Funk <a24061@ducksburg.com> - 2014-05-23 11:27 +0100
Re: hashing strings to integers Adam Funk <a24061@ducksburg.com> - 2014-05-23 11:36 +0100
Re: hashing strings to integers Chris Angelico <rosuav@gmail.com> - 2014-05-23 21:01 +1000
Re: hashing strings to integers (was: hashing strings to integers for sqlite3 keys) Chris Angelico <rosuav@gmail.com> - 2014-05-23 20:59 +1000
Re: hashing strings to integers Adam Funk <a24061@ducksburg.com> - 2014-05-27 16:13 +0100
Re: hashing strings to integers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-05-27 17:02 +0000
Re: hashing strings to integers Chris Angelico <rosuav@gmail.com> - 2014-05-28 05:16 +1000
Re: hashing strings to integers Dan Sommers <dan@tombstonezero.net> - 2014-05-28 01:55 +0000
Re: hashing strings to integers Adam Funk <a24061@ducksburg.com> - 2014-06-03 11:29 +0100
Re: hashing strings to integers Adam Funk <a24061@ducksburg.com> - 2014-06-03 11:32 +0100
Re: hashing strings to integers Terry Reedy <tjreedy@udel.edu> - 2014-05-23 15:10 -0400
Re: hashing strings to integers Adam Funk <a24061@ducksburg.com> - 2014-05-27 16:20 +0100
Re: hashing strings to integers for sqlite3 keys alister <alister.nospam.ware@ntlworld.com> - 2014-05-22 14:48 +0000
csiph-web