couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Exclude documents from view based on list of regex expressions
Date Tue, 18 Sep 2012 17:24:26 GMT

On Sep 18, 2012, at 10:17 AM, Aurélien Bénel <aurelien.benel@utt.fr<mailto:aurelien.benel@utt.fr>>
wrote:

Are you sure an array of regexes would be as efficient as a compound regex?

Good point — I don’t know the innards of SpiderMonkey but I think it’s pretty much a
guarantee that a compound regex would be much faster. In general the fewer times you have
to jump out of or into an interpreter (meaning both JS and the regex state-machine) the better.

If I recall the syntax correctly, it would look like /bar|baz/ … right?

—Jens


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message