> Which is faster (memcpy or inline or and << operations)?  It varies widely 
> depending on the compiler, the CPU, the length of the data, the 
> implementation of the library, etc.  It's impossible to make any kind of 
> generalization (other than this one :).

Im sorry!! I made a mistake in my code. memcpy is definately faster. Please 
ignore my question. I did a proper test to come to this conclusion :

SHA512 hash for 1000000 characters of 'a' using memcpy aligned function : 
~6000000 clock cycles.
SHA512 hash for 1000000 characters of 'a' using math function to adjust data 
alignment : ~9000000 clock cycles.

But i guess this only applies for my hardware and not others. It is really hard 
to say what the compiler is doing beneath the system, and I am no expert in 
these matters.

Regards,
Vishnu.

_________________________________________________________________
Manage multiple email accounts with Windows Live Mail effortlessly.
http://www.get.live.com/wl/all

Reply via email to