48
submitted 7 months ago by [email protected] to c/[email protected]

Can we make a Rust program that’s as small as it’s assembler equivalent?

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 1 points 7 months ago

i think nothing can outperform simple asm for simple operations.

[-] [email protected] 3 points 7 months ago

IDK, I'm not aware of all the fancy asm commands, but compilers are, so a good compiler will probably produce better code than me. For example, simple loops could turn into a set of SIMD instructions or be unrolled, while I'd naively do a jump loop.

this post was submitted on 18 Feb 2024
48 points (100.0% liked)

Rust

5772 readers
10 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS