E D R , A S I H C RSS

Lazy Optimization


크누쓰가 말했다. "Premature optimization is the root of all evil."

간혹 컨텍스트에 따라 퍼포먼스가 매우 중요한 상황에서도 가능하면 뒤늦게 옵티마이징을 하는 것이 좋은 경우가 많다. 특히, 프로파일링을 철저히 한 후에 말이지.

이건 개인적인 생각인데, micro-code tuning은 그 사람 코딩 실력이나 아니면 프로그램 전체 퍼포먼스에 크게 득이 되는 것 같지는 않다. meso-macro tuning이나 알고리즘, 자료구조 개선 등이 양자에 훨씬 더 많은 도움이 되는 듯.

그리고 가독성(readibility)을 높여 놓으면 우선은 퍼포먼스에서 손실이 있을 것 같지만 흥미롭게도 조금 후에 훨씬 더 큰 퍼포먼스 이득을 볼 수 있는 것들이 "인간 눈에 좀 더 쉽게 드러나게(emergent)" 된다.

여기서 가독성이란, 통념적인 협의의 읽기 편한 것만은 아니겠지.

--JuNe

ReplaceTempWithQuery 의 경우도 같은 이유로 설명이 될 것 같네요. --석천


최근 ACM Ubiquity와 Verity의 CTO Raghavan과의 인터뷰:

It is often exhilarating. I'll give you an example of the kind of question that I used to ask my colleagues there, and this will give you a sense of how things go in a research lab environment. I said, "The big challenge is to imagine that you have no computation constraints. If you had this power at your disposal, how could you do a better search engine? " Meaning, could you give people better answers? Now, that's more than a hard exercise, because it actually led to the development of some of the algorithms that we came up with in the project. What it does, is set you free to think in a different dimension, and then you come back and say, "All right, now we invented an algorithm that gives great results, but is excruciatingly slow." What can you then do as a computer scientist to bring its performance to an acceptable level? Being able to do that and thinking about ideas is very exhilarating, and that's what you could do at an IBM Research facility. ''From http://www.acm.org/ubiquity/interviews/p_raghavan_1.html''

Raghavan은 LazyOptimization이 (연구자들에게) 새로운 차원의 사고를 하게 도와준다는 말을 한다. 우리가 "정말 멋진 무언가"를 만들어 내지 못하는 것은, 기술력의 부족함보다 상상력의 빈곤 때문은 아닌가 하는 생각을 해본다.

--JuNe
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:37
Processing time 0.0158 sec