Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port
Address
to Rust (pantsbuild#18989)
Profiles on pantsbuild#18911 show that a large fraction of our runtime is in the "core" rules in `graph.py`. In order to ease porting some of the `@rules` in `graph.py` to intrinsics, this change ports `Address` (and `AddressInput`) to rust. Although `Address` itself rarely shows up in profiles, it is one of the core datastructures "below" `graph.py` (along with `Field` and `Target`, which are the next subjects for porting). It would also be possible to port `graph.py` to intrinsics _without_ porting the datastructures that it consumes, but working with native datatypes significantly improves the ergonomics of working with these types from rust (since after being automatically converted at method boundaries, or converted explicitly with `any.extract::<Address>()?`, rust methods can be called directly rather than going through Python method dispatch). Improves performance of `./pants --no-pantsd dependencies ::` by about 2%.
- Loading branch information