Skip to content

성능

es-toolkit은 설계할 때 성능을 우선적으로 고려하고 있어요. lodash와 같은 다른 라이브러리와 비교했을 때, 평균적으로 2배의 성능 향상을 확인할 수 있었어요. 함수에 따라서는 11배 빠른 성능을 보이기도 했죠. 현대적인 JavaScript API을 이용하여 구현했기 때문이에요.

성능 비교

테스트 환경
CPU:13th Gen Intel(R) Core(TM) i5-13400F 16 코어
메모리:31.82 GB
Node.js:v24.11.1
플랫폼:win32 x64
es-toolkit@1.49.0lodash@4.18.1Difference
omit5,022,632 times1,402,566 times3.6×
pick11,335,718 times2,876,787 times3.9×
differenceWith16,930,604 times5,811,529 times2.9×
difference12,373,746 times7,004,902 times1.8×
intersectionWith17,384,852 times5,031,392 times3.5×
intersection11,338,214 times5,550,564 times2.0×
unionBy5,068,515 times5,342,267 times0.9×
union4,849,245 times6,209,626 times0.8×
dropRightWhile18,381,692 times12,726,057 times1.4×
groupBy6,507,297 times6,540,958 times1.0×

벤치마크 코드를 참고하세요

MIT 라이선스에 따라 배포됩니다.