The problem with your analysis is that you're using big-O notation. Big-O notation is based on an abstract machine that is pretty unrepresentative of real computers. In practice, the memcpy is always going to be faster (until you get to really big sizes). Put another way, linked list is O(1) with a massive constant, and memcpy is O(n) with a tiny constant.
And actually this logic extends to other algorithms too. My rule of thumb is that a linear search (despite being O(n)) will be faster up to around n=100 than binary search (which is O(log n)) just due to the way the CPU operates.
And actually this logic extends to other algorithms too. My rule of thumb is that a linear search (despite being O(n)) will be faster up to around n=100 than binary search (which is O(log n)) just due to the way the CPU operates.