In OpenMP threading, preallocate the thread buffer instead of allocating the buffer every time. This patch improved the performance slightly.