getgrit / gritql

GritQL is a query language for searching, linting, and modifying code.
https://docs.grit.io/
MIT License
3.17k stars 82 forks source link

perf: remove `im` crate #536

Closed arendjr closed 1 month ago

arendjr commented 1 month ago

Gives rougly a 25-30% performance improvement on Biome's Grit benchmarks.

Heads-up: This changes a signature in api.rs. It looks like it should be easy enough for you to adapt, but let me know if you prefer me to revert to im there.

There's a bunch of .iter() => as usize changes that were unfortunately necessary due to ambiguities.

Would be great if 0.4 of the crates can be released after merging this: https://github.com/getgrit/gritql/pull/498

Greptile Summary

This is an auto-generated summary

API usage limit has reached your account's monthly budget. API requests will be rejected.

morgante commented 1 month ago

Thanks, I've long wanted to remove this and it should be easy enough to adapt internally too.