Re:Optimizing Rust Struct Size
by kibwen on Saturday April 15, 2017 @06:00PM
(#14123085)
Using fuel to enable a binary search to uncover misapplied optimizations is very clever! I always just figured that fuel was used to avoid pathological behavior in the optimizer by putting an upper bound on the time spent optimizing.
[ Parent
| on HN ]
The first time I think I saw the idea was [0], but I don't know if this is the post that got linked in the discussion threads. Rust didn't have fuel at all until after my changes, and I don't think it's necessary to use it as a limit unless you're letting the optimizer run on the optimizer's output until it stops changing. The number of optimizations Rustc can run is already finite because it doesn't do so.
nonetheless, the idea isn't original to us.
0: http://blog.ezyang.com/2011/06/debugging-compilers-with-opti...