Performance comparison of Array.find and Array.indexOf
javascript에서 Array.find and Array.indexOf의 성능을 비교해 보면,
const item = arr.find(item => item == AAA);const index = arr.indexOf(AAA);indexOf가 훨신 빠릅니다. 물론 index를 이용해서 Array를 참고해야하는 부분이 귀찮긴한거같다.
javascript에서 Array.find and Array.indexOf의 성능을 비교해 보면,
const item = arr.find(item => item == AAA);const index = arr.indexOf(AAA);indexOf가 훨신 빠릅니다. 물론 index를 이용해서 Array를 참고해야하는 부분이 귀찮긴한거같다.