lance-format / lance-format/lance

Make Rust benchmark builds faster

Open
#1,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

benchmark rust
Dominant language
Rust
Stars
7.1k
Forks
852
Avg merge
3d 18h
Merged PRs (30d)
272

Description

Benchmarks are very slow to build, mostly because (1) we have a very large library and (2) we have many benchmarks binaries, which each need to independently link to our very large binary. Unless I set --jobs 1, I run out of memory trying to build them.

For the microbenchmarks, most of our benchmarks are our optimized distance functions and linear algebra functions. If we put them in a separate sub-crate (lance-compute?), then it should be must faster to link the microbenchmarks. We might even be able to consolidate the binaries for an additional benefit.

For macro benchmarks, we should probably move them over to the Python benchmarks in the top-level benchmarks directory. Then we just have to link one Python library and we can re-use it for as many benchmarks as we want.

TODO

  • #1218
  • Separate algorithms into smaller library and benchmark separately.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing Rust benchmark binaries and the top-level benchmarks directory, then measure which builds consume the most memory and time. Determine how the microbenchmark algorithms and macro benchmarks are currently organized; done means separating the algorithms into a smaller library and benchmarking them independently, with faster builds and reduced memory use.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.