Re: The performance of Editplus is much better than notepad,Why?



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:

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
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Steve Jobs demos Macintosh in 1984
    ... Woody wrote: ... Stop annoying the fucking hell out of me, ... For sure not much computer memory had been made in 1948 - but it could ... For sure you got a bit more RAM to use in the Speccy - ...
    (uk.comp.sys.mac)
  • Re: Windows uses 4 GB? Really?
    ... I bought 4 GB of RAM because I thought it would speed up my system a bit. ... Some info that is posted here as reference seems to suggest that it is a Windows issue, but others seem to suggest that it is also a hardware issue. ... "I have install total 4GB memory on my motherboard. ... On a SLI system, since PCI-Ex graphic cards will occupy around 256MB, another 256MB will be occupied after you install a 2nd PCI-Ex graphic card. ...
    (microsoft.public.windowsxp.general)
  • Re: Computer wont boot up after installing new RAM
    ... I even took a look at an old Gigabyte motherboard ... DDR2 memory stick, the notch does not line up. ... "To install the memory module, ... into the motherboard RAM slots. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Random Restarts - Please Help
    ... I upgraded my BIOS a long time ago ... Beginners Guides: Diagnosing Bad Memory ... How to diagnose bad RAM ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Alocated Memory Error (SQLSERVR)
    ... but my understanding is that the MSDE instances are designed to ... and you don't want it grabbing all that RAM. ... running but non ever going about 200mb of memory usage. ... Server 2000 SP4, ...
    (microsoft.public.windows.server.sbs)