On Sat, Dec 15, 2012 at 10:29 PM, Wolfgang Strobl <ne...@mystrobl.de> wrote:
> Christian Heimes <christ...@python.org>:
>
>>To be fair, memcpy() is a pretty simple function.
>
> This, of course, depends on the target architecture. See for example
> <http://www.microchip.com/forums/m120261.aspx> or
> <http://www.piclist.com/techref/member/IMB-yahoo-J86/memcpy.asm.htm>
>
>>It can be implemented
>>in just about two lines of C code plus five lines of boiler plate.
>
> Or in a single line of IBM 360 ASM/F Code, plus boiler plate. :-)
> <http://www.bixoft.nl/english/opcd/mvcl.htm>
>
> In 1979, I implemented various block move code snippets for three
> different eight bit microprocessors of that time. The parameterized
> variant took between 20 and >30 instructions.

Same in 8086 - you just do a REP MOVSB (after setting CX to the
length, DS:SI to the source, ES:DI to the destination). But it's
slower than the equivalent with more explicit register action.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to