From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH v4] Bound index checks in cl-seq functions Date: Mon, 6 Feb 2017 02:15:20 -0500 Message-ID: <56ebd313-aa91-128c-b7f4-36f551c1a670@gmail.com> References: <87efzdrjsj.fsf@calancha-pc> <87lgtlru13.fsf_-_@calancha-pc> <3026a9d6-fd50-ff2d-d702-d895402430c4@gmail.com> <87inon7qhh.fsf_-_@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1486365333 11166 195.159.176.226 (6 Feb 2017 07:15:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 07:15:33 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: Philipp Stephani , Emacs developers , Noam Postavsky To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 08:15:27 2017 Return-path: Envelope-to: ged-emacs-devel@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 1cadWI-0002Zi-8w for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 08:15:26 +0100 Original-Received: from localhost ([::1]:45875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cadWN-0008EF-Fc for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 02:15:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cadWH-0008E8-DL for emacs-devel@gnu.org; Mon, 06 Feb 2017 02:15:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cadWE-0000RO-6u for emacs-devel@gnu.org; Mon, 06 Feb 2017 02:15:25 -0500 Original-Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:34437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cadWE-0000RG-1x for emacs-devel@gnu.org; Mon, 06 Feb 2017 02:15:22 -0500 Original-Received: by mail-qt0-x241.google.com with SMTP id w20so13591594qtb.1 for ; Sun, 05 Feb 2017 23:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=24m1cyv6RMWwrbMsY6RgYmzIeQIZSApXdSc7KjWITJU=; b=sC585OJx6g4pQLIN410CLIzGoj7pK91s1xJ6y12MZufFliA/9sIFwXfboMjuElXGpe GfNb5EIkbewHSSn7AQ53FuF6g7b/jSIKDU2RwnlNVwOReSdPapT5Ytqv/9+VL6zsUHdX caXRlGzsITGzQ6OLOtDfNECNlf6Uxs8SACbJUtHcBUBvWi52prCc1+WTrzbot0t3emAX tSoku05mrWMEnUnYeMmhoQBY6F9xchqIAoNR5rd5AA6suFu5H+VUrDxur/B89FNUh11b KdNkzuehwG5GFgQ4FKZi8VSjwVYFAeqBT/Joyx1iKAD22WxKtrZ6rwIdsQE4XazkAhZJ 22ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=24m1cyv6RMWwrbMsY6RgYmzIeQIZSApXdSc7KjWITJU=; b=hrOnsmxaJl1TMhxeatTQmx9pnYWkJ2xVEan9WV1+u21PZDd0URO3SZdjdov5wA06dt cJw/QmV7zqnhYShoirRaxp+EKsOYWoC5Ef0vb7/jXaTIMqu1PiuQ+YcqlHBBU4nx6unR 4z2ca0uFBNbye+3P9s2dI+9q1wyuej1nKVFek/6TPGdcI/iJm/notKay0eiuriIMn1nH JkjXIkSnrDHjNgcui+O/ixVCconZtONg8avxpFWGoWn3KcT/GQe++d+evIIrlFmRpiZs EMSKl8ByuWR9ZLQtFWzO+O0+2xwp7l1gfP3Y92u60STxjoL6v8ZoG4u89wmt9YbAUkpg 1aKg== X-Gm-Message-State: AMke39mwymkf54C+XFA3gGRd4X58oLTupYh0QDpKUTtorMXvP0rYru1yFeUFkuISYQHMGw== X-Received: by 10.200.37.141 with SMTP id e13mr8078902qte.226.1486365321512; Sun, 05 Feb 2017 23:15:21 -0800 (PST) Original-Received: from [18.189.115.217] (dhcp-18-189-115-217.dyn.MIT.EDU. [18.189.115.217]) by smtp.gmail.com with ESMTPSA id s71sm32296208qkl.22.2017.02.05.23.15.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Feb 2017 23:15:21 -0800 (PST) In-Reply-To: <87inon7qhh.fsf_-_@calancha-pc> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::241 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:212021 Archived-At: On 2017-02-06 02:00, Tino Calancha wrote: > Clément Pit-Claudel writes: >> On 2017-02-05 02:11, Tino Calancha wrote: >>> II) `cl--check-bound-indices' returns on success the sequence[s] >>> length[s], so that callers don't need to recompute them. >> This sounds like a good idea, performance wise. But maybe it would be >> even better to disable these checks when (cl-declaim (optimize (safety >> 0))) is set? > Yes, that sounds right. > The new patch disables those checks in that case (safety = 0). > I got ~0.92 s without checks and ~ 1.10 with checks > when i ran the following toy: Great, thanks! :)