From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] extend map-into Date: Tue, 08 Oct 2019 16:23:33 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="198185"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Nicolas Petton , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 08 22:23:54 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHw1S-000pQp-7c for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2019 22:23:54 +0200 Original-Received: from localhost ([::1]:36972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHw1Q-0001TF-UZ for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2019 16:23:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38800) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHw1E-0001Sk-6P for emacs-devel@gnu.org; Tue, 08 Oct 2019 16:23:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHw1C-00027O-Rp for emacs-devel@gnu.org; Tue, 08 Oct 2019 16:23:39 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50573) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHw1C-00026T-LB for emacs-devel@gnu.org; Tue, 08 Oct 2019 16:23:38 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0296D100F1D; Tue, 8 Oct 2019 16:23:37 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B3A77100DFD; Tue, 8 Oct 2019 16:23:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1570566215; bh=H7P7YsH8eagzjtvltbku8lIiZDpwCqSpshWGFMkQTFc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=STn9LQEwjw9rL2/OvUS48uPXHPA0B/Hkv+KVDf1h3g7d+S+b4IIFIr0RVvaE8+crz 63HJcATUexrmgcxG14kN8xF4x5TLA601ikiP2wY3gY8YNQzd4cMPd0HNc8/VDhyjz6 RlwFOTVeeYXIn7WKOuJiAjKrsGOo3P9Vm7KrFkbiPNCt3IHCRaxz2h1TbGaw5rueR6 hXnXgoVzkCiyno2PVmpqV/n969br/F5p/LmrKn/pu5nsD8Mrn9vYEjQCVxeW3iM3s3 U3VICRH9nuNe9arj56PGjgfA88gCWu0kmSXA7s6YCZc+dDkc49pMTYenUeC4TnHiml 5/jutf5DfwSBA== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8579F1209CA; Tue, 8 Oct 2019 16:23:35 -0400 (EDT) In-Reply-To: (Andrea Corallo's message of "Tue, 08 Oct 2019 18:46:06 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:240761 Archived-At: > I can tell you what I did just now and you tell me if it makes sense. > I've created a function with as body an unrolled loop that calls 10000 > times (map-into nil 'alist). > Once byte compiled I've run it with the current map.el and then with the > new one loaded. That sounds about right. Tho, you can also use something like `benchmark` for that. > On my machine both versions runs in about the same time (~0.04-0.03 > secs), if there's some difference for this simple test is just noise. 0.03 seconds is too small for a meaningful measure, in my experience, I recommend you add 2 zeroes to the number of iterations to bring it into the realm of "a few seconds". But, yes, there's a chance the difference is negligible (more time is spent in the funcall/apply machinery itself and/or the hash lookup than the specific computation of the "tag" used to index the hash-table, which is the part that depends on the set of specializers used on a particular argument of a generic function). Stefan