Performance of copy algorithm
Dhruv Matani
dhruvbird@gmx.net
Mon Aug 11 13:22:00 GMT 2003
A) Open coded loop on char 7.20s
B) memcpy 0.80s
C) Loop using doubles 1.68s
(cheats on alignment and block size)
D) memmove 18.96s
E) std::copy (which translates to memmove) 18.96s
I have just copy pasted this form a post in the past.
I'd like to say, that on my system (RH-9, 2.4.20-8), memmove
is _*actually*_ faster than memcpy!!!!! That comes as a surprise to me.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/
More information about the Libstdc++
mailing list