Will my program run faster with this library? And how much?

Submitted by markos on Sun, 01/20/2008 - 19:17.

It depends. If your program does 1 million memcpy() calls, of 5 bytes each, the library will not benefit you at all. It might actually even be slower, due to the a slightly bigger overhead. Actually, in truth it's quite bad design to do a memcpy for such a small buffer. On the other hand, depending on what your application does, you might enjoy significant benefit from using such a library. Eg. the AltiVec version of swab() in this library is ~7x faster than the scalar code. But it won't make a difference to your program if you only call it at the initialization code for a 100 byte buffer.

Also, does your app use mainly aligned or unaligned buffers? So far, I can say that the performance hit from unaligned addresses is mostly minimized, but it's of course a penalty.

( categories: )