LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 21 Sep 2010 22:35:19 +0930
Content-Type:
text/plain
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