Introduction
While all code should be efficient, code for library-like components, especially involving loops, should be as efficient as possible since such code is often widely used.
In my A Simple Dynamic Array for C, I included the source code for a function to clean-up a dynamic array:
void array_cleanup( array_t *array, array_free_fn_t free_fn ) {
if ( array == NULL )






