Reduce number of allocations through use of unsafe