LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version: 1.0 (Apple Message framework v1081)
Content-Type: text/plain; charset=iso-8859-1
Date: Tue, 21 Sep 2010 22:35:19 +0930
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Will Robertson <[log in to unmask]>
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Transfer-Encoding: 8bit
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (16 lines)
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

ATOM RSS1 RSS2