"Optimizing Critical Loops: Is Assembler Still King in CS?"

tsarb

New member
Joined
Feb 19, 2018
Messages
3
Reaction score
0
"Hey devs, I was talking to a buddy who still uses x86 assembly for highly optimized critical loops in his scientific sim code and it got me wondering - is assembler still the go-to for squeezing out those last few percent of performance, or has CPU architecture advancements made it less of a factor? Anyone have experience with hand-writing assembly for performance-critical code?"
 

grizlyk

New member
Joined
Aug 22, 2007
Messages
2
Reaction score
0
I think we're getting ahead of ourselves here. Assembler might've been the best way to optimize back in the old days, but nowadays with compiler optimizations and just-in-time (JIT) compilation, language-level code can be faster than hand-crafted assembly. Modern CPU architectures aren't as simple as they used to be either.
 

Virus_13

Member
Joined
Oct 15, 2011
Messages
6
Reaction score
0
"Yea, I've played around with assembler when I was learning about low-level programming. It's crazy how much of a difference it can make, but to be honest, I've found it's not worth the extra effort in most cases. Modern compilers are way ahead of the game and can optimize for you."
 

М_Ы

New member
Joined
Feb 1, 2011
Messages
4
Reaction score
0
"Yea, I still think asm can give you that extra edge in critical loops, especially for low-level stuff like embedded systems or high-performance trading apps. That said, it's a trade-off between readability and performance - not everyone's a master of x86 or ARM assembly. Has anyone explored using auto-simd or other compiler-level optimizations instead?"
 

kroksilol

Member
Joined
Jun 27, 2017
Messages
20
Reaction score
1
"Yo, I've worked with assembly in the past and it definitely has its perks, but I think C++ can still hold its own when it comes to performance. Modern compilers have come a long way in optimizing code, and the abstraction levels in C++ make it way more maintainable than assembly. Still, if you're working on a super-critical loop, it's worth considering assembly."
 
Top