Skip to content

성능 ​

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

성능 비교 ​

테스트 환경
CPU:Apple M4 10 코어
메모리:16.00 GB
Node.js:v22.23.2
플랫폼:darwin arm64
es-toolkit@1.52.0lodash@4.18.1Difference
omit3,973,624 times1,306,896 times3.0×
pick9,038,224 times2,220,822 times4.1×
differenceWith12,169,353 times4,009,328 times3.0×
difference9,097,445 times5,122,555 times1.8×
intersectionWith11,220,380 times3,022,015 times3.7×
intersection8,431,475 times4,348,418 times1.9×
unionBy4,422,940 times3,558,872 times1.2×
union4,092,678 times4,331,186 times0.9×
dropRightWhile12,852,312 times8,392,579 times1.5×
groupBy4,540,652 times3,557,114 times1.3×

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

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