Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Show me your strcpy

Name: Anonymous 2010-05-13 20:16

Here is my string copy function: http://pastebin.com/f7gBfsDY

<Nola> it took agner fog 3 years to write a strcpy
<Nola> why are you guys all lamers
<Nola> would you write some lame ass thing that loops and copies Chars
<Nola> that version is gonna be 10x faster than your C loop


Three years, motherfuckers.  Have you optimized your hand-coded assembly strcpy() today?

Name: Anonymous 2011-02-13 3:23

Bumping this thread because I was doing some reversing and found a memcpy implementation that takes a total of 6,878 bytes. It starts by issuing cpuid, then makes a ton of other decisions such as whether to use MMX, SSE, etc. before finally moving data around with either movsd/movsw/movsb, MMX/SSE, the FPU, or just move/store instructions, all complete with a bunch of subcases to handle unaligned data. What the fuck.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List