Indeed. Object.keys allocate a new array. This line does more harm than good.