What's the exact mean of Profile in computing field?
在 程序设计实践(The Practice of Programming,Brian W.Kernigham,裘宗燕 译)这本书的第7章(性能)中,作者讲了一个垃圾邮件过滤器的例子:一个不适合这个应用场景的字符匹配函数导致了整个应用的低效,说它不适合这个应用场景 是因为这个函数在其他运行环境下是工作正常的(性能上),也就是说这个函数没有错,只是不适合这个场景。在这章里面有一句话引起我的注意:
"在1971年引进轮廓文件这个术语 的文章中, Don Knuth写到:"一个程序中少于百分之四的部分通常占了程序一半以上的执行时间。"这也指明了轮廓文件的使用方法:弄清程序中最消耗时间的部分,尽可能 地改进这些部分,然后再重新测量,看看是否有新的热点浮现出来。通常在重复一次两次以后,程序里就再也没有明显的热点了。"
我想"轮廓文件" 应该对应原文的Profile这个单词(需要去我的Ubuntu资料 库里面考证,英文资料都在里面呢),Profile这个词我是经常在计算机相关的资料里面看到,今天终于找到源头了。
源 头:
The concept of Profile was introduced by Donald E. Knuth (Donald E. Knuth. An empirical study of FORTRAN programs. Software: Practice & Experience, 1:105�133, 1971)。 NOTE:Donald E. Knuth是1974年图灵奖的得主,也是The Art of Computer Programming的作者。
这是这篇文献的摘要:
Abstract: A sample of programs, written in FORTRAN by a wide variety of people for a wide variety of applications, was chosen 'at random' in an attempt to discover quantitatively 'what programmers really do.' Statistical results of this survey are presented here, together with some of their apparent implications for future work in compiler design. The principal conclusion which may be drawn is the importance of a program 'profile,' namely a table of frequency counts which record how often each statement is performed in a typical run; there are strong indications that profile-keeping should become a standard practice in all computer systems, for casual users as well as system programmers. The paper is the report of a three month study undertaken by the author and about a dozen students and representatives of the software industry during the summer 1970. It is hoped that a reader who studies the report will obtain a fairly clear conception of how FORTRAN is being used, and what compilers can do about it.
Ref URLs