Skip to content

cargo-public-api/cargo-public-api-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cargo-public-api-benchmarks

Benchmarks for cargo-public-api and related crates.

Currently experimental.

Low-hanging fruits

Here is a list of things that probably would significantly improve the performance of the public-api crate:

  • Make UnprocessedItem::parent_path contain Vec<Rc<PathComponent>> instead of Vec<PathComponent>. That should give a noticeble performance boost since PathComponent is cloned a lot, and wrapping it inside of an Rc should significantly reduce the number of heap allocations.
  • Use multiple threads to process ItemProcessor::work_queue (and use Arc instead of Rc above)
  • Instead of rendering impls to group them in the output (which according to my profiling takes a long time), use something like a DisambiguatedDefPathData with a disambiguator: u32.

About

Benchmarks for cargo-public-api and related crates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages