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 6:11

>>40
choosing which one to use at compile time would be even better.

Name: Anonymous 2011-02-13 6:42

>>41
Too bad C has no Lisp macros.

Name: Anonymous 2011-02-13 7:00

choosing which one to use at compile time would be even better.
Not everyone uses gentoo.

Name: Anonymous 2011-02-13 7:00

>>36
IHBT

Name: Anonymous 2011-02-13 7:03

>>43
You'd use the >>36 one not compiling the OMG OPTIMIZED one, otherwise too bad; slow as fuck.
Also, go back to /g/entoo.

Name: Anonymous 2011-02-13 8:26

>>41
Not every processor has MMX, SSE19, Power8D Later, therefore it's impossible to choose best way during compile time

Name: Anonymous 2011-02-13 8:31

Name: Anonymous 2011-02-13 14:41

Jesus fucking Christ, how fucking hard is it?

Just have have the function pointers to strcpy/memmove/etc. patched at run-time with the appropriate ones for the given CPU. Are you people all fucking retarded or have I been trolled constantly?

Name: Anonymous 2011-02-13 15:20

>>48
But those functions are frequently inlined!
Luckily, all my code runs on virtual machines. CLI, bitches.

Name: Anonymous 2011-02-15 9:42

>>49
No. Optimized versions are not inlined. What inlined is trivial
while(*a++=*b++)

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