From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: expose XHASH [patch] Date: Fri, 1 Apr 2016 11:44:32 +0200 Message-ID: References: <56FDA815.2090801@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1459503879 30677 80.91.229.3 (1 Apr 2016 09:44:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2016 09:44:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 01 11:44:38 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1alvd8-0002lm-Eo for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 11:44:38 +0200 Original-Received: from localhost ([::1]:43004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alvd7-00021f-OO for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 05:44:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alvd4-00021U-57 for emacs-devel@gnu.org; Fri, 01 Apr 2016 05:44:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alvd3-0005ds-DR for emacs-devel@gnu.org; Fri, 01 Apr 2016 05:44:34 -0400 Original-Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:34154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alvd3-0005dm-8U for emacs-devel@gnu.org; Fri, 01 Apr 2016 05:44:33 -0400 Original-Received: by mail-oi0-x244.google.com with SMTP id q133so11794351oib.1 for ; Fri, 01 Apr 2016 02:44:33 -0700 (PDT) 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:to :cc; bh=28XNwamqdlD3bDVk8p6ukD2TLNRsnBaMFw9fYhPuuDE=; b=I0m9mpS17z89n/FgpIN2UX8WoyqDL5uAw7A3DgWMo0wy0B+mYRRwmfO1g8OYaE+lxD Bt23elu5DMdGm8OjAAfU862TsQLOGZMpQw6wipZTXt5RVx6octLdoE6S/rfR8vMEmhsd dR7b2QQtd/Dn5Gknv0MzvWl5ajerpVrm+wmEInx7ABLadcuVX/kuCoqc6PhXbIt0j+la iYrzdfaqeEzhK3k+65uo5vOP4I8L9H1M42kEl8rUOTN3FX+g1jJF8X9OcQwWMto0N+0s vkvPC7CvBINFzHQ0XtBONwSNSd3JOjGy4FW5AAi0iWuTAonAqaMOd3zNhX8WB5aX2p+d NI7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=28XNwamqdlD3bDVk8p6ukD2TLNRsnBaMFw9fYhPuuDE=; b=mLLpAxEe4FU6SniXBw006JN2nq3+PsvXb6lDp8XgphpleMRo1JjId800cPiH1irt4i dOy8g8uT4uAl5IseHreSDtPxOmha5jR/ze7zSZ+bBd1bdy5p7rmKPqgWIgudNn/881Jr RORWM0D8/mbmKnaIJ8KQbUxntkzPf7K5HsoL7mQVmtuqvgejha8HnGNRUoRinQCbz1ql /Wae/LXLP9i6r/yCoDUZGKrftAKzWoFIe9w9gPTFMjnV37yBd8sOglLrY3A5Q8uOoyoT 8QBFMJI4kEEsThdfYT8J58swm5vuKD/qvASt0rebHaLaDKnn4peTGw3Gm/F0mgvGFHrQ zSTQ== X-Gm-Message-State: AD7BkJI46Xc/cwf3P71KsYQf4ljY4JPxIOz7O2GYub6nCLrnoJ39qQeW/0IYzw1M4ODRj5TTDXzFB/xLr+FyBg== X-Received: by 10.157.24.91 with SMTP id t27mr1994804ott.101.1459503872769; Fri, 01 Apr 2016 02:44:32 -0700 (PDT) Original-Received: by 10.202.197.148 with HTTP; Fri, 1 Apr 2016 02:44:32 -0700 (PDT) In-Reply-To: <56FDA815.2090801@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202559 Archived-At: Paul Eggert wrote: > The documentation for the new function should be next to the documentation for sxhash. I just skipped all the examples related to 'sxhash'. But I don't mind. > Shouldn't we expose hashfn_eq, not XHASH? After all, (make-hash-table :test 'eq ...) uses hashfn_eq, not XHASH. Probably you are right. I don't know the internal details well enough to comment on this. > Should we also expose hashfn_eql, which is what make-hash-table uses by default? Or is that a waste of time since hashfn_eql is the default? I'd say expose it too, at least for the cases of composite hashing as in my example. > Not sure I like the name xhash. Maybe sxhash-eq instead? That would let us use the name sxhash-eql for hashfn_eql. I tried to keep familiar names (at least for those who work on C code), but if we change that to 'hashfn_eq' and additionally expose something for 'eql', I guess your idea is better. I'll wait if more comments on these points appear before creating next patch iteration. Paul