Repository activity
40458 results across all weeks
perf(stdune): avoid allocation in Nonempty_list.last
Return the final element of a non-empty list directly instead of allocating an intermediate option.
Antonio Nuno Monteiro (@anmonteiro)perf(stdune): inline bounded string prefixes
Inline String.take's small length clamp at callers without adding branches or changing String.sub allocation and physical-identity behavior.
Rudi Grinberg (@rgrinberg)perf(stdune): inline comparator operators
Mark the small Ordering-based relation operators for forced inlining so callers can invoke each concrete comparator without the shared functor wrapper.
Rudi Grinberg (@rgrinberg)perf(stdune): parse valid local paths directly
Share an is_valid predicate between the result-returning and
Rudi Grinberg (@rgrinberg)perf(stdune): reuse validated canonical path components
Path.Local.t already guarantees that its slash-separated components are valid filenames. Avoid validating those components again in basename, explode, and split_first_component, and reuse the canonical suffix returned by the latter directly.
Rudi Grinberg (@rgrinberg)perf(stdune): use memchr to validate spawn arguments
Every process invocation validates the working directory, executable, and argument strings for embedded NUL bytes. Replace the OCaml byte-by-byte scan with an allocation-free C stub using libc memchr, while preserving the existing validation errors.
Rudi Grinberg (@rgrinberg)perf(stdune): validate exceptional filenames directly
Rudi Grinberg (@rgrinberg)perf(targets): avoid intermediate validation states
Target validation currently folds through Validation_result.t, rebuilding both the validated-target record and its Valid wrapper for every target.
Rudi Grinberg (@rgrinberg)perf(targets): preserve unchanged target sets
Targets.combine is used while accumulating action targets. When both set unions reuse the fields from an input, return that existing Targets.t instead of allocating an equivalent record.
Rudi Grinberg (@rgrinberg)perf(targets): specialize singleton validation
Bypass the general target-validation path for the common case of a rule with a single file target. Expose Array.Set.length so the singleton fast path can be detected without converting the compact set representation.
Rudi Grinberg (@rgrinberg)perf(targets): validate files and directories directly
Use direct folds for file and directory target validation instead of a generic callback-driven fold. Preserve sorted traversal, first-parent selection, file/directory conflict selection, and terminal errors.
Rudi Grinberg (@rgrinberg)perf: batch qualified module dependency lookup
Prepare qualified-module dependency lookup once per batch so parent discovery is not repeated for every dependency name.
Antonio Nuno Monteiro (@anmonteiro)perf: build qualified group closures with one traversal
Build qualified-group dependency closures with a reverse accumulator, avoiding intermediate subtree lists and quadratic copying for nested groups.
Antonio Nuno Monteiro (@anmonteiro)perf: increase Dune's default minor heap
Dune's no-op self-builds allocate enough short-lived data to collect the
Rudi Grinberg (@rgrinberg)pkg: add @pkg-source alias
Motivation
Ali Caglayan (@Alizter)refactor(cli): share scheduler configuration setup
Centralize scheduler configuration creation and concurrency propagation across CLI entry points.
Antonio Nuno Monteiro (@anmonteiro)refactor(compilation): remove duplicate mode normalization
Antonio Nuno Monteiro (@anmonteiro)refactor(compilation-context): share default flag setup
Share project- and profile-based default flags for generated alias and root modules.
Antonio Nuno Monteiro (@anmonteiro)refactor(cram): extract test specification
Extract the fold that combines all matching cram stanzas for a discovered test into a dedicated spec_for_test helper. The helper builds the complete test specification, including aliases, dependencies, sandboxing, environment, locks, packages, timeouts, setup scripts, and shell settings.
Rudi Grinberg (@rgrinberg)refactor(describe): share build context setup
Several dune describe subcommands repeated scheduler startup, build-system initialization, and build-context lookup. Centralize that setup in Build.describe so each command only supplies its memoized describe operation.
Rudi Grinberg (@rgrinberg)