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 p3EH3u65018365 for ; Thu, 14 Apr 2011 19:03:57 +0200 Received: (qmail 15288 invoked by alias); 14 Apr 2011 17:03:51 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 14 Apr 2011 17:03:51 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx103) with SMTP; 14 Apr 2011 19:03:51 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p3EH0df9005669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2011 19:00:40 +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 p3EE8Peo020770; Thu, 14 Apr 2011 19:00:39 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1251801 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 14 Apr 2011 19:00:39 +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 p3EH0dqt018148 for ; Thu, 14 Apr 2011 19:00:39 +0200 Received: from anchor-post-2.mail.demon.net (anchor-post-2.mail.demon.net [195.173.77.133]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p3EH0BM8006214 for ; Thu, 14 Apr 2011 19:00:16 +0200 Received: from morningstar2.demon.co.uk ([80.176.134.7] helo=palladium.local) by anchor-post-2.mail.demon.net with esmtp (Exim 4.69) id 1QAPs2-0003jE-ka; Thu, 14 Apr 2011 16:58:18 +0000 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 References: <4DA5C4E2.8090005@morningstar2.co.uk> <58AFBC3A-4209-4BC0-BB3A-5B14D6B5EFD8@gmail.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4DA727A9.2050903@morningstar2.co.uk> Date: Thu, 14 Apr 2011 17:58:17 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: The nature of popping from an empty sequence To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <58AFBC3A-4209-4BC0-BB3A-5B14D6B5EFD8@gmail.com> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p4yCuwxJv6KY7czVqrYqZDOTB12Tp1iimCLOnwc12pw/iQa6ClsHFToSP+j3 IzaYQpD+Ni6jAEhFhMTTu/FK5B5HbsdDBQetNB+WfFs7JcYaLVz71svU5q5/5LVwMYH7LF60Tszv Om58EXBf3jvIQYR/tyBqgrf7+/ioH1mbBR0VMcYiiBZ1dPyBUrMmR+UQDW4P3wuAxnEGA==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: 6704 On 14/04/2011 09:44, Will Robertson wrote: > * These should probably be consistent. > * I think returning a quark is dangerous in case of sloppy package authors. If we want consistency between \seq_... and \prop_..., then that is fine but we also need to worry about performance. I'm worried about property lists, as they are used a lot in siunitx. With the short test file \documentclass{article} \usepackage{expl3} \begin{document} \ExplSyntaxOn \prop_new:N \test \tl_new:N \testa \prop_put:Nnn \test { a } { b } \pdfresettimer \prg_replicate:nn { 10000 } { \prop_get:NnN \test { a } \testa \quark_if_no_value:NTF \test { } { } } \showthe\pdfelapsedtime \pdfresettimer \prg_replicate:nn { 10000 } { \prop_if_in:NnTF \test { a } { \prop_get:NnN \test { a } \testa } { } } \showthe\pdfelapsedtime \end{document} I find that the quark-based approach is about twice as fast as using \prop_if_in:Nn. Granted, this is somewhat artificial, but I do essentially this a lot inside siunitx and do not really want to loose speed if I can avoid it. -- Joseph Wright