very slight performance improvement in C code