Count 1 Billion, C++ faster than Assembly?
Вставка
- Опубліковано 24 гру 2022
- C++ vs Assembly Count 1 Billion loop
Turns out C++ is faster than assembly.
C++ using Visual Studio Community 2022
Assembly using FASM (Flat Assembler)
Debugger: IDA Freeware
#shorts #asmr #coding #programming #assembly #asm #cpp #cplusplus #war #battle #benchmark #loop #billion #visualstudio #flatassembler #debugging - Наука та технологія
I did not understand the explanation part… could someone help out here?
the C++ compiler optimizes the code, it removes the loop and directly assign final value to the variable..
@@resoftw but is it possible for you to otimize it better using assembly as c++ is just an optimized easy to read and control language of assembly itself ?
@@dogeplayz0919 yes, just like what C++ complier does, just assign a direct value..
@@resoftw oh sorry 😅 i didnt quite understand what you said at the top i guees ( sorry srsly ! )