Reduce size of Expr from 80 to 64 bytes (#9900)

## Summary

This PR reduces the size of `Expr` from 80 to 64 bytes, by reducing the
sizes of...

- `ExprCall` from 72 to 56 bytes, by using boxed slices for `Arguments`.
- `ExprCompare` from 64 to 48 bytes, by using boxed slices for its
various vectors.

In testing, the parser gets a bit faster, and the linter benchmarks
improve quite a bit.
This commit is contained in:
Charlie Marsh
2024-02-08 18:53:13 -08:00
committed by GitHub
parent bd8123c0d8
commit 49fe1b85f2
78 changed files with 326 additions and 258 deletions

View File

@@ -569,8 +569,7 @@ mod tests {
#[cfg(target_pointer_width = "64")]
#[test]
fn size_assertions() {
// 80 with Rustc >= 1.76, 88 with Rustc < 1.76
assert!(matches!(std::mem::size_of::<ParenthesizedExpr>(), 80 | 88));
assert_eq!(std::mem::size_of::<ParenthesizedExpr>(), 72);
}
#[test]