Skip to main content

Command Palette

Search for a command to run...

DoD에 대한 기록

Updated
4 min read

전 글에도 적었지만 swc css minifier 성능 최적화를 하다가 DoD 라는 걸 알게 됐다. 힙 할당을 늘렸는데 성능이 엄청 올라간 걸 보고, ES minifier에도 적용해보고 싶어졌다. 물론 지금 당장 적용할 순 없는 게, SWC의 ES 모듈들은 다운스크림이 너무 많아서 그 정도 규모의 breaking change를 자주 만들긴 힘들다. 그리고 제일 문제인 건 이미 배포된 Wasm 플러그인들이고...

나중에 TS 4.9 지원하면서 AST 호환성 깰 때 같이 머지하려고 ES AST를 DoD를 고려하면서 바꿨고, 벤치마크에 필요한만큼만 패치를 해봤다. 벤치마크 결과는 다음과 같다.


Benchmarking es/minify/libraries/antd
Benchmarking es/minify/libraries/antd: Warming up for 3.0000 s

Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 6.2s.
Benchmarking es/minify/libraries/antd: Collecting 10 samples in estimated 6.1933 s (10 iterations)
Benchmarking es/minify/libraries/antd: Analyzing
es/minify/libraries/antd
                        time:   [620.86 ms 624.46 ms 628.66 ms]
                        change: [-22.841% -22.308% -21.758%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking es/minify/libraries/d3
Benchmarking es/minify/libraries/d3: Warming up for 3.0000 s

Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 7.6s or enable flat sampling.
Benchmarking es/minify/libraries/d3: Collecting 10 samples in estimated 7.6350 s (55 iterations)
Benchmarking es/minify/libraries/d3: Analyzing
es/minify/libraries/d3  time:   [129.75 ms 130.21 ms 130.61 ms]
                        change: [-15.798% -15.371% -14.986%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/echarts
Benchmarking es/minify/libraries/echarts: Warming up for 3.0000 s
Benchmarking es/minify/libraries/echarts: Collecting 10 samples in estimated 9.7596 s (20 iterations)
Benchmarking es/minify/libraries/echarts: Analyzing
es/minify/libraries/echarts
                        time:   [485.80 ms 487.35 ms 488.88 ms]
                        change: [-23.405% -22.989% -22.583%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/jquery
Benchmarking es/minify/libraries/jquery: Warming up for 3.0000 s
Benchmarking es/minify/libraries/jquery: Collecting 10 samples in estimated 6.5932 s (165 iterations)
Benchmarking es/minify/libraries/jquery: Analyzing
es/minify/libraries/jquery
                        time:   [39.674 ms 39.790 ms 39.888 ms]
                        change: [-7.4199% -6.9714% -6.5607%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/lodash
Benchmarking es/minify/libraries/lodash: Warming up for 3.0000 s
Benchmarking es/minify/libraries/lodash: Collecting 10 samples in estimated 6.2038 s (110 iterations)
Benchmarking es/minify/libraries/lodash: Analyzing
es/minify/libraries/lodash
                        time:   [54.658 ms 54.983 ms 55.276 ms]
                        change: [-6.0030% -5.0606% -4.3268%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/moment
Benchmarking es/minify/libraries/moment: Warming up for 3.0000 s
Benchmarking es/minify/libraries/moment: Collecting 10 samples in estimated 5.5915 s (220 iterations)
Benchmarking es/minify/libraries/moment: Analyzing
es/minify/libraries/moment
                        time:   [24.989 ms 25.056 ms 25.132 ms]
                        change: [-6.9642% -6.4017% -5.7664%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking es/minify/libraries/react
Benchmarking es/minify/libraries/react: Warming up for 3.0000 s
Benchmarking es/minify/libraries/react: Collecting 10 samples in estimated 5.0256 s (440 iterations)
Benchmarking es/minify/libraries/react: Analyzing
es/minify/libraries/react
                        time:   [11.304 ms 11.333 ms 11.348 ms]
                        change: [-4.0229% -3.4375% -2.8645%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking es/minify/libraries/terser
Benchmarking es/minify/libraries/terser: Warming up for 3.0000 s

Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 6.3s or enable flat sampling.
Benchmarking es/minify/libraries/terser: Collecting 10 samples in estimated 6.2739 s (55 iterations)
Benchmarking es/minify/libraries/terser: Analyzing
es/minify/libraries/terser
                        time:   [113.05 ms 113.25 ms 113.53 ms]
                        change: [-14.455% -13.868% -13.346%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/three
Benchmarking es/minify/libraries/three: Warming up for 3.0000 s

Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 9.4s or enable flat sampling.
Benchmarking es/minify/libraries/three: Collecting 10 samples in estimated 9.3763 s (55 iterations)
Benchmarking es/minify/libraries/three: Analyzing
es/minify/libraries/three
                        time:   [168.85 ms 169.15 ms 169.52 ms]
                        change: [-19.905% -19.348% -18.833%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/typescript
Benchmarking es/minify/libraries/typescript: Warming up for 3.0000 s

Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 13.6s.
Benchmarking es/minify/libraries/typescript: Collecting 10 samples in estimated 13.646 s (10 iterations)
Benchmarking es/minify/libraries/typescript: Analyzing
es/minify/libraries/typescript
                        time:   [1.3660 s 1.3703 s 1.3747 s]
                        change: [-20.914% -20.551% -20.250%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/victory
Benchmarking es/minify/libraries/victory: Warming up for 3.0000 s
Benchmarking es/minify/libraries/victory: Collecting 10 samples in estimated 5.9296 s (20 iterations)
Benchmarking es/minify/libraries/victory: Analyzing
es/minify/libraries/victory
                        time:   [290.98 ms 293.52 ms 296.23 ms]
                        change: [-16.272% -15.458% -14.495%] (p = 0.00 < 0.05)
                        Performance has improved.
Benchmarking es/minify/libraries/vue
Benchmarking es/minify/libraries/vue: Warming up for 3.0000 s
Benchmarking es/minify/libraries/vue: Collecting 10 samples in estimated 6.7515 s (110 iterations)
Benchmarking es/minify/libraries/vue: Analyzing
es/minify/libraries/vue time:   [59.382 ms 59.627 ms 59.912 ms]
                        change: [-7.4172% -6.7056% -5.9969%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe

3% ~ 23%면 진짜 무지막지하게 큰 숫잔데, 진짜 날로 먹은 기분이다. 지금 당장 적용할 수 있는 건 아니지만 난 DoD를 찬양하기로 했다.

글 마무리 짓는 건 항상 어려운데 그냥 내가 DoD를 공부할 때 쓴 자료들 링크 남기고 끝내겠다.

  • https://media.handmade-seattle.com/practical-data-oriented-design/
  • https://www.youtube.com/watch?v=WDIkqP4JbkE

More from this blog

한국의 학벌에 대한 생각

내 블로그의 제목이 kdy1: The way I think 인만큼 앞으로는 내 생각을 더 자주 올리려고 한다. 한국 기준으로, 학벌은 사람을 볼 때 꽤나 유용한 지표이지만, 절대적이지는 않다. 경험적인 얘기일 뿐이지만, 성균관대학교 자퇴생으로서 느낀 것들이 몇 가지 있다. 대학까지 간 사람의 학벌은 학습 능력 x 성실함 에 대체로 비례한다. 그래서 의미가

Apr 3, 20261 min read

인간 지능에 대한 메모장

최종 업데이트: 2026/03/15 지능의 유전 현재 인류 기준으로, 고지능자는 고지능 유전자가 많이 겹친 사람이다. 지능의 유전엔 X 염색체가 매우 중요한 역할을 한다. 그리고 이게 남자와 여자의 지능 분포 차이를 만든다. 극상위권에 여자가 거의 없는 이유가 이것이다. 고지능 X 염색체가 여자한테서 발현되려면 2개가 있어야 한다. 이는 인간의 생

Mar 15, 20262 min read

Ai 코딩 팁 2 (한국어)

발표 자료: https://gamma.app/docs/AI--2a52e7tk3eb1ch1 AI 활용법 관련해서 간단하게 발표를 했다. 발표 자료 앞쪽은 전에 블로그에 올린 글이랑 같은 내용이다. 이 글에서는 기존 글에서 다루지 않은 내용들을 다루겠다. 에러 메시지 및 로깅 구체적 타입 및 스키마 활용 any 타입은 사람에게도 위험하지만, AI에게는 더 위험하다. 마찬가지로, JSON.parse처럼 아무 제약 없는 파싱 느슨한 인터페이스 ...

Jan 30, 20265 min read

kdy1: The way I think

233 posts