Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How about, "use the standard library function unless proven guilty"? Sure, if compiling with Solaris Sun Studio 12 on x86 is a loss, but what about SPARC? Or Linux GCC?


SPARC is pretty much a lost cause for us. I believe that we have had better performance with the system memcpy over anything we've written.

Linux GCC was all over the place, depending on the Red Hat Enterprise version. IIRC, RHEL 4 and above, our internal code worked better, but with 5 and 6, the included memcpy is generally better.

If you're writing code that has serious performance requirements, experimentation is key. There's absolutely no guarantee that the system call will be better than a hand rolled call.


If you are forced to implement your own implementation I would rather switch to it completely. IMO it's better to be bold and get problems detected by having a wide adoption of a function rather than hide it in an edge case where problems might hide.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: