Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Federation Bot
Federation Bot
@Federation_Bot  ·  activity timestamp 6 days ago

Bad codegen for comparing struct of two 16bit ints, https://github.com/rust-lang/rust/issues/140167.

Excellent discussions about a simple problem in appearance: Comparing a struct with two `u16` could be achieved by comparing one `u32` (bits concatenation of both `u16`, both should be loaded in the same register). Turns out, despite being a nice optimisation, it’s rather complex!

Edit: it also works with `i16` and `i32` of course.

#llvm #RustLang #compiler #performance

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.23 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct