A study in code optimization in C

Andrew Hume andrew at alice.UUCP
Fri Jul 27 14:34:24 AEST 1990



i hate to interject experimental results into a computer
science discussion but i implemented mr harter's `always faster'
memcpy just to see. the machine was an SGI 4D/240 running
irix 3.2.1. the timing is for 100000 copies of n bytes
(n uniform between 0 999). results:
	memcpy 2.81s
	harter 9.02s

in my experience, memcpy is osmething vendors REALLY work on;
to suggest that a simple portable implementation would beat
the system's memcpy implies you have only tried this on batshit systems.



More information about the Comp.lang.c mailing list