faster merge with copy to dynarray
even faster merge with copy to static array
added comments suggesting why static array might be faster