#Compare generated ARM assembly from a trivial division function

12 messages · Page 1 of 1 (latest)

loud basin
#

Hey y'all, curiosity has driven me to experiment and try to understand assembly for the first time. I'm trying to compare the generated ARM assembly from 3 different languages - one of which C++ - and understand the differences in instructions. I'd really appreciate if someone coud go through this with me, figure out which is faster, etc... here is the godbolt link: https://godbolt.org/z/eb3rasEaq

hollow bladeBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

plush rain
#

best would probably be if you could ask specific questions about what things are unclear to you

loud basin
plush rain
#

which different approaches?

loud basin
#

although c++ and rust are closest to each other

plush rain
#

well, start by understanding how each one of them actually works before worrying about what the differences are

#

the rust and C++ one is pretty straightforward

loud basin
plush rain
#

so what exactly is confusing you?

#

it'll be a lot easier if you can ask specific questions instead of asking for someone to just deliver you a general lecture on how to read ARM assembly