From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#28302: 26.0.50; [PATCH] Make ucs-names a hash table Date: Thu, 31 Aug 2017 12:05:46 +0200 Message-ID: <871snscarp.fsf@gmail.com> References: <87r2vsqqeo.fsf@holos> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1504173976 26525 195.159.176.226 (31 Aug 2017 10:06:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2017 10:06:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 28302@debbugs.gnu.org To: Mark Oteiza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 31 12:06:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnMMQ-0006N6-9y for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Aug 2017 12:06:06 +0200 Original-Received: from localhost ([::1]:54750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnMMX-0002av-EP for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Aug 2017 06:06:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnMMQ-0002aX-MT for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2017 06:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnMMM-0001b3-Py for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2017 06:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55755) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnMMM-0001au-Kd for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2017 06:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dnMMM-00076s-7x for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2017 06:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2017 10:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28302 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28302-submit@debbugs.gnu.org id=B28302.150417395927320 (code B ref 28302); Thu, 31 Aug 2017 10:06:02 +0000 Original-Received: (at 28302) by debbugs.gnu.org; 31 Aug 2017 10:05:59 +0000 Original-Received: from localhost ([127.0.0.1]:36203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnMMJ-00076a-1Z for submit@debbugs.gnu.org; Thu, 31 Aug 2017 06:05:59 -0400 Original-Received: from mail-wr0-f176.google.com ([209.85.128.176]:34107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnMMG-00076N-T3 for 28302@debbugs.gnu.org; Thu, 31 Aug 2017 06:05:57 -0400 Original-Received: by mail-wr0-f176.google.com with SMTP id z91so774101wrc.1 for <28302@debbugs.gnu.org>; Thu, 31 Aug 2017 03:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=HWAlkLMKZYi7SR5AhQhVtyqw5L2XDxLyeQe9dvl53LI=; b=cS6i6w/4LFO/E88Mu9YBKzaZQYpjlEg4N4CNw9yo3wVifU/Cpxa7T+D2jLIJD5MiF3 wXMbpOgAL48PpXibOyZ8wNG3+01ZozYOcewdwqHD2tkTexVGijuKQ5C++g352I40AmO6 z6xvUDj0GfXigWhPU4nPbhAh/Wdwq7a8Rs9V1asUfiX2NR8tkAMnV1R+MLcBc5ojbmuM 5aAyvrXWFDlE7GKe79dfVQVLs5a4PJ9G41BC+IIxIGeF5+fX3cBlPmRl8Evwmldq9Bm9 MaQcbICoCHuuwn3P8El9BOunmLDLnWxdGl33LFtnRQgi9V71thx359zVJUg9cy4cwKqN CGHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=HWAlkLMKZYi7SR5AhQhVtyqw5L2XDxLyeQe9dvl53LI=; b=P8Jgi/2oZr0YSpCje21fKphobo8PutN1aw+f2P9he6mstiwibiwL5wu/dpt1DD7gIR bVEazrPwl8ajkNoqjnHKTT34GehWS9URxHrdfsRj9D501nMXd9kA+tvthiMDRm3zZzxO vParnESR77lbg4t6hDbOc+FSyudsvNwBAC/7gCiYLvRr3Egh7tyiLcFGp71qsC9FjKlQ 9fZw9a7MpvUhKIxhLBjtVuB/lpzS/OpLQGZsTwkUPGgd59mdhgXtbMKlXFGfiN3H6Fe3 7at+vxusw2n3ZhpdTY/e4F2+ZAiEUPmCDIBeleYNfX02t1IVz2+hHEqF8NdtLoquyKJp WF1A== X-Gm-Message-State: AHYfb5htTaA3VP8mavibggGjmqstSD0j3wbw07DNy7VXuOddie+gBxI6 RlJg+cRcFAW6lfW5A0A= X-Google-Smtp-Source: ADKCNb7MOev0bg7nKRzWpvTtJdZkKtp3jmnXfDi1NohvMj/ezuDJ0dcgdWpqvDAjEPKHoc9I9oLrEw== X-Received: by 10.223.130.37 with SMTP id 34mr2139239wrb.334.1504173950694; Thu, 31 Aug 2017 03:05:50 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id 73sm5318433wrl.56.2017.08.31.03.05.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Aug 2017 03:05:49 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87r2vsqqeo.fsf@holos> (Mark Oteiza's message of "Thu, 31 Aug 2017 01:04:15 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136402 Archived-At: Mark Oteiza writes: > Hi, > > I seem to remember there having been complaints about ucs-names preview > being slow. I was curious about how much of that time was spent > assoc'ing every element of a roughly n = 42k element long alist, and so > tried making it a hash table instead. The result is a drastic speedup > of C-x 8 RET TAB, presumably this makes the operation O(n) vs O(n^2). I haven't timed it exactly, but it makes a *very* noticeable difference here. Thanks for this. Regards Robert