Avoid useless assignments, casts, std::arrays

further optimise dictionary generation runtime.