{"push_id":1111989596,"size":2,"distinct_size":2,"ref":"refs/heads/rollup","head":"1f6195eda586dd2c4ce50ddcd70a91a20d654b76","before":"f0dbad7e03f3b7239f57b5d02ff953b74e865e7a","commits":[{"sha":"0eeb14eaba04025aa8a4612e1935f04f2ca3fb6b","author":{"email":"d5e0892e7d66bcce47406a02632e7b4f50cda414@gmail.com","name":"Björn Steinbrink"},"message":"Improve derived implementations for enums with lots of fieldless variants\n\nA number of trait methods like PartialEq::eq or Hash::hash don't\nactually need a distinct arm for each variant, because the code within\nthe arm only depends on the number and types of the fields in the\nvariants. We can easily exploit this fact to create less and better\ncode for enums with multiple variants that have no fields at all, the\nextreme case being C-like enums.\n\nFor nickel.rs and its by now infamous 800 variant enum, this reduces\noptimized compile times by 25% and non-optimized compile times by 40%.\nAlso peak memory usage is down by almost 40% (310MB down to 190MB).\n\nTo be fair, most other crates don't benefit nearly as much, because\nthey don't have as huge enums. The crates in the Rust distribution that\nI measured saw basically no change in compile times (I only tried\noptimized builds) and only 1-2% reduction in peak memory usage.","distinct":true,"url":"https://api.github.com/repos/eddyb/rust/commits/0eeb14eaba04025aa8a4612e1935f04f2ca3fb6b"},{"sha":"1f6195eda586dd2c4ce50ddcd70a91a20d654b76","author":{"email":"7b617481dc67255f8ac089bf33cb7fadcdc5dda1@gmail.com","name":"Eduard-Mihai Burtescu"},"message":"Rollup merge of #33593 - dotdash:smart_derive, r=brson\n\nImprove derived implementations for enums with lots of fieldless variants\n\nA number of trait methods like PartialEq::eq or Hash::hash don't\nactually need a distinct arm for each variant, because the code within\nthe arm only depends on the number and types of the fields in the\nvariants. We can easily exploit this fact to create less and better\ncode for enums with multiple variants that have no fields at all, the\nextreme case being C-like enums.\n\nFor nickel.rs and its by now infamous 800 variant enum, this reduces\noptimized compile times by 25% and non-optimized compile times by 40%.\nAlso peak memory usage is down by almost 40% (310MB down to 190MB).\n\nTo be fair, most other crates don't benefit nearly as much, because\nthey don't have as huge enums. The crates in the Rust distribution that\nI measured saw basically no change in compile times (I only tried\noptimized builds) and only 1-2% reduction in peak memory usage.","distinct":true,"url":"https://api.github.com/repos/eddyb/rust/commits/1f6195eda586dd2c4ce50ddcd70a91a20d654b76"}]}