Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions crates/fff-core/benches/glob_bench.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
//! Compare three glob-matching strategies for `match_glob_pattern` in constraints.rs:
//!
//! 1. Current: `zlob_match_paths` -> collect `as_ptr()` into AHashSet, filter paths
//! by pointer to recover indices.
//! 2. Free fn: `zlob_match_paths_indices` (added in zlob 1.4) — indices direct from C.
//! 3. Compiled: `ZlobPattern::compile` + `match_indices` — same indices path, but with
//! a precompiled pattern (reusable). For one-shot it should match (2); the win
//! appears if the pattern is reused (chunked / repeated calls).
//! Compare three glob-matching strategies for `match_glob_pattern` in constraints.rs
//! need to make sure that my zlob changes are not affecting fff's internal globbing
use ahash::AHashSet;
use criterion::{BenchmarkId, Criterion, black_box, criterion_group, criterion_main};
use zlob::{ZlobFlags, ZlobPattern, zlob_match_paths, zlob_match_paths_indices};
Expand Down
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";

# in zlob we compile by default with -target=native unless CI is detected, because
# nix is different we have to make sure that the build target is a baseline cpu
CI = "1";

# Zig 0.16 insists on writing to its global cache even when the
# zlob build.rs passes --global-cache-dir. In the nix sandbox $HOME
# is /homeless-shelter (unwritable), so redirect to $TMPDIR before
Expand Down
Loading