Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id o8LD7Svh005690 for ; Tue, 21 Sep 2010 15:07:29 +0200 Received: (qmail 28100 invoked by alias); 21 Sep 2010 13:07:23 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 21 Sep 2010 13:07:20 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx103) with SMTP; 21 Sep 2010 15:07:20 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o8LD6orW021995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Sep 2010 15:06:50 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o8LB1khh018044; Tue, 21 Sep 2010 15:05:32 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 457728 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 21 Sep 2010 15:05:32 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id o8LD5WC5001006 for ; Tue, 21 Sep 2010 15:05:32 +0200 Received: from mail-pv0-f177.google.com (mail-pv0-f177.google.com [74.125.83.177]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o8LD6fCL021857 for ; Tue, 21 Sep 2010 15:06:45 +0200 Received: by pvg12 with SMTP id 12so2202773pvg.22 for ; Tue, 21 Sep 2010 06:05:27 -0700 (PDT) Received: by 10.114.151.5 with SMTP id y5mr11750839wad.172.1285074327042; Tue, 21 Sep 2010 06:05:27 -0700 (PDT) Received: from [10.0.1.107] (114-30-106-154.ip.adam.com.au [114.30.106.154]) by mx.google.com with ESMTPS id s5sm15534138wak.0.2010.09.21.06.05.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Sep 2010 06:05:25 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1081) References: <4C967C9B.5010706@gmx.de> <71ED7A5B-DE11-45D9-9785-95A1DC795080@gmail.com> <4C9724B4.3010301@residenset.net> <19607.26705.947540.499705@morse.mittelbach-online.de> <4C9840AB.4050805@gmx.de> <732A7500-5414-4818-87E3-33CB14463288@gmail.com> <4C98435A.1050507@gmx.de> <4C989ACB.5060000@morningstar2.co.uk> X-Mailer: Apple Mail (2.1081) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id o8LD5WC5001007 Message-ID: <353AB782-051D-400D-99B4-E3258AAB4F35@gmail.com> Date: Tue, 21 Sep 2010 22:35:19 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: boolean expressions in ExplSyntaxNames To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4C989ACB.5060000@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7Y6oT1sPizBjJUAOds0oJBO/5TIz9C5741aj9GOJ bE70Q==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6430 On 21/09/2010, at 9:15 PM, Joseph Wright wrote: > How does the following look? The Boolean expressions are the most basic versions (NOT takes one argument, others take two), but nesting seems to work fine. There is definitely less code to this than the current implementation, so there would be a performance gain. These don't mix with the old syntax, right? Oh, if you remove your redefinition of \bool_if_p:n then they can intermingle. The same benchmark I gave earlier gives two more numbers for a single loop over that somewhat complex boolean expression: one with the simplified \bool_if_p:n and one with the more complex implementation of \bool_if_p:n in the current code. Original: 76µs (using infix notation) Current: 55µs (using functional notation but the current \bool_if_p:n) Simple: 35µs (using functional notation with simplified \bool_if_p:n) I'm not willing to throw away the infix notation, but I think it's worth adding (or, I guess, re-adding) the functional notation for those who want it. -- Will