Skip to content

Commit 275a1a2

Browse files
committed
flip order of eval for binary matching
The string matching on the filename is capable of discarding matches far faster than the binary filter, so switching the order of these two is a free 20% latency decrease.
1 parent d8415af commit 275a1a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pkgfile.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ std::unique_ptr<filter::Filter> Pkgfile::BuildFilterFromOptions(
328328
if (options.mode == MODE_SEARCH) {
329329
if (options.binaries) {
330330
filter = std::make_unique<filter::And>(
331-
std::make_unique<filter::Bin>(bins_), std::move(filter));
331+
std::move(filter), std::make_unique<filter::Bin>(bins_));
332332
}
333333

334334
if (!options.directories) {

0 commit comments

Comments
 (0)