I think swap will be more efficient than memcpy for smaller objects because it does not use a loop. For bigger objects, locality of reference will make memcpy execute faster.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 4 of 4
Threaded View
|
Click Here to Expand Forum to Full Width |