uv/crates/puffin-cli
Andrew Gallant d0b21dcda4
puffin-{cli,dev}: switch to mimalloc and jemalloc
This copies the allocator configuration used in the Ruff project. In
particular, this gives us an instant 10% win when resolving the top 1K
PyPI packages:

    $ hyperfine \
        "./target/profiling/puffin-dev-main resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null" \
        "./target/profiling/puffin-dev resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null"
    Benchmark 1: ./target/profiling/puffin-dev-main resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null
      Time (mean ± σ):     974.2 ms ±  26.4 ms    [User: 17503.3 ms, System: 2205.3 ms]
      Range (min … max):   943.5 ms … 1015.9 ms    10 runs

    Benchmark 2: ./target/profiling/puffin-dev resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null
      Time (mean ± σ):     883.1 ms ±  23.3 ms    [User: 14626.1 ms, System: 2542.2 ms]
      Range (min … max):   849.5 ms … 916.9 ms    10 runs

    Summary
      './target/profiling/puffin-dev resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null' ran
        1.10 ± 0.04 times faster than './target/profiling/puffin-dev-main resolve-many --cache-dir cache-docker-no-build --no-build pypi_top_8k_flat.txt --limit 1000 2> /dev/null'

I was moved to do this because I noticed `malloc`/`free` taking up a
fairly sizeable percentage of time during light profiling.
2023-11-10 14:30:09 -05:00
..
src puffin-{cli,dev}: switch to mimalloc and jemalloc 2023-11-10 14:30:09 -05:00
tests Delete any directories listed in the RECORD file (#394) 2023-11-10 18:17:52 +00:00
Cargo.toml puffin-{cli,dev}: switch to mimalloc and jemalloc 2023-11-10 14:30:09 -05:00