From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: expose XHASH [patch] Date: Thu, 31 Mar 2016 15:43:33 -0700 Organization: UCLA Computer Science Department Message-ID: <56FDA815.2090801@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1459464242 13685 80.91.229.3 (31 Mar 2016 22:44:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 22:44:02 +0000 (UTC) To: Paul Pogonyshev , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 01 00:43:53 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 1allJh-0002KZ-AJ for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2016 00:43:53 +0200 Original-Received: from localhost ([::1]:34880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1allJg-000519-J3 for ged-emacs-devel@m.gmane.org; Thu, 31 Mar 2016 18:43:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1allJT-00050d-3D for emacs-devel@gnu.org; Thu, 31 Mar 2016 18:43:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1allJP-0004sl-Qy for emacs-devel@gnu.org; Thu, 31 Mar 2016 18:43:39 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1allJP-0004sH-LW for emacs-devel@gnu.org; Thu, 31 Mar 2016 18:43:35 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C0F83161148; Thu, 31 Mar 2016 15:43:34 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id IYC7NI9cgkoD; Thu, 31 Mar 2016 15:43:34 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 19605161208; Thu, 31 Mar 2016 15:43:34 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4SIuPTyNnj_j; Thu, 31 Mar 2016 15:43:34 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 02721161148; Thu, 31 Mar 2016 15:43:34 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 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:202542 Archived-At: On 03/31/2016 12:29 PM, Paul Pogonyshev wrote: > Attached trivial patch just exposes internally used XHASH(), > which fully suits this usecase. Thanks, I like the overall idea but have some quibbles about the details. The documentation for the new function should be next to the documentation for sxhash. Shouldn't we expose hashfn_eq, not XHASH? After all, (make-hash-table :test 'eq ...) uses hashfn_eq, not XHASH. 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? Not sure I like the name xhash. Maybe sxhash-eq instead? That would let us use the name sxhash-eql for hashfn_eql.