Re: The performance of Editplus is much better than notepad,Why?
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Mon, 20 Nov 2006 20:24:22 -0500
Absolutely the right attitude. The problem today is that too many teachers of computer
science grew up on minicomputers, where memory, particularly code size, DID matter. The
problem is that they failed to grow up with the technology around them, and still cling
to, and teach, rather obsolete concepts such as minimizing code size. This is a
discipline that matters only for people doing embedded applications with limited memory,
and should not be taught as a fundamental paradigm. These are the same people who teach
that function calls cost performance and should be avoided, that heap allocation is
expensive, and other irrelvant myths from the past. I spent a lot of years retraining
programmers who learned from these teachers.
What matters, and for most practical purposes, the ONLY thing that matters, is that the
code be written quickly, robustly, is robust-under-maintenance, easily read, easily
understood, and well-commented to support future development. Code size, and on the
whole, code performance, are simlpy meaningless metrics most of the time. Only when you
have some deep inner loop, such as an image processing loop, sound transformation loop,
etc. would performance of lines of code matter.
As I tell my students, "Optimizing code will buy you single-digit percentages in
performance. Optimizing architecture will buy you orders of magnitude". Most performance
problems are in the architecture of the system. And performance rarely matters these days
anyway. When a typical instruction takes 1/6ns (a 3GHz Pentium 4 superscalar architecture
could in principle dispatch 9 instructions per 333ps clock cycle, or 27 instructions per
ns, but realistically you tend to see numbers around 6 instructions/ns, due to delays in
getting data from memory) there is so much excess capacity most of the time that worrying
about lines-of-code performance is almost always a waste of time.
Performance matters only when it matters. When it matters, it matters a lot. But until
you discover that it matters, it isn't even worthy of consideration.
I find concerns about code size, especially those expressed by the OP, to be completely
irrelevant. They bear no relationship to anything that matters, most especially program
performance.
joe
On 20 Nov 2006 15:32:40 -0800, "jussij@xxxxxxxxxxxx" <jussij@xxxxxxxxxxxx> wrote:
wei.niu@xxxxxxxxx wrote:Joseph M. Newcomer [MVP]
I found editplus's performance is much better than
notepad. Editplus uses only 2--2.5M memory whereas
notepad uses more than 4M. Why?
Out of curiosity, why do you even bother measuring
performance in terms of RAM?
A typical PC comes with about 1000 M of RAM so 4 M is
nearly nothing. Personally I would measure performance
in program user response times rather than RAM.
If the program is fast and responsive as a user I would
not care less how much RAM it is using.
Jussi Jumppanen
Zeus For Windows - "The ultimate programmer's editor/IDE"
http://www.zeusedit.com
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: The performance of Editplus is much better than notepad,Why?
- From: Ian Semmel
- Re: The performance of Editplus is much better than notepad,Why?
- From: wei . niu
- Re: The performance of Editplus is much better than notepad,Why?
- From: Dan Bloomquist
- Re: The performance of Editplus is much better than notepad,Why?
- References:
- The performance of Editplus is much better than notepad,Why?
- From: wei . niu
- Re: The performance of Editplus is much better than notepad,Why?
- From: jussij@xxxxxxxxxxxx
- The performance of Editplus is much better than notepad,Why?
- Prev by Date: Re: MFC application with its own desktop
- Next by Date: have a class like CString but work with ASCII in Unicode mode?
- Previous by thread: Re: The performance of Editplus is much better than notepad,Why?
- Next by thread: Re: The performance of Editplus is much better than notepad,Why?
- Index(es):
Relevant Pages
|