View Single Post
Old 29 December 2023, 15:35   #4
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,361
Quote:
Originally Posted by SpeedGeek View Post
Getting back to a more general discussion, I think C coders can realize just as much as ASM coders that calling Copymem() for <= 4 bytes is very inefficient (a definite should not do) but there are some lazy coders who will do that anyway.
Calling it for anything that takes longer than the necessary number of inlined move operations is inefficient. This is why your typical C compiler will just emit something like that when copying a structure. I am sure there's a break even point somewhere, but that depends on the CPU and cache state.
Karlos is offline  
 
Page generated in 0.04788 seconds with 10 queries