Unofficial Hacker News client - receive Push Notifications on replies.

Optimizing Rustc's next trait solver (opens external site)

212 points by g0xA52A2A 5 days ago | donsz.nl | 47 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. > or even -O5

    -O4 and higher are (currently) equivalent to -O3

    > I don't depend on serde because I knew it is bloated but didn't know serde_json was so bloated too.

    serde_json depends on serde though?

    > I don't think there are any template use in either project except things like hashmaps and slices etc. I don't use traits except to interact with dependencies in rust.

    If you're interested in investigating further it might be worth trying cargo bloat [0] or similar to get a bit more data about what is consuming space. rustc's self-profiling framework [1] might be another way to get data.

    [0]: https://github.com/razrfalcon/cargo-bloat

    [1]: https://github.com/rust-lang/measureme

    Replies (1)
    1. > serde_json depends on serde though?

      Ahhh, of course.

      Thanks for the suggestions.

      Edit: I was able to reduce the output code size to <600KB from the original 1.3MB after exploring the suggestions. It made the release build time a lot longer but it is worth it for my use case.