| New Essay: "Optimising Code for Speed" |
[Feb. 13th, 2009|02:55 pm]
|
| [ | Tags | | | c programming, code, dos, optimisation, optimise, optimising, optimization, optimize, optimizing, programming, programs, slow, slowness, speed, windows | ] |
| [ | Current Location |
| | Home | ] |
| [ | Current Music |
| | The Beatles - Here Comes the Sun | ] |
I published a
new essay about optimising code for speed on my site, which you are
welcome to read. Quoting from it:
We've all seen the fact that while computers got faster, software has
often become slower to run unless the hardware is upgraded. The so-called "Gates'
Law" claims that commercial programs decrease in speed by half
every 18 months, due to various reasons. It is well known that the various
versions of the DOS
operating system ran adequately on a PC XT's and 286's and that a Intel 386
was a "lean and mean DOS machine" as a certain journalist claimed back
then. On the other hand, Microsoft Windows 3.0 and Microsoft Windows 3.1
already required a fast 486 computer to be ran comfortably, while Windows
95 was barely usable there and needed a Pentium computer. Windows XP
already ran slowly on a Pentium machine and required a high end Pentium III
or Pentium 4 computer. Windows Vista
requires even more hardware resources than Windows XP, up to the point that
many computers in use today cannot run it comfortably.
Now, while software simulations that run directly against the CPU and
memory (and possibly hard-disk) are still running much faster than before,
the responsiveness of the system itself does not seem to improve much.
I used Wikibooks to work on this
article. Except for a few minor changes from other people, I was the only
contributor. One thing that disappointed me was that wiki2xml (a MediaWiki
extension that can convert the text to DocBook/XML and other formats)
blissfully ignored all internal or wikipedia links ([[…]]),
rendering many links in the article useless. This required that the article
be extracted from the wiki by cleaning up the HTML of the page.
|
|
|
| Comments: |
From: (Anonymous) 2009-02-13 11:04 pm (UTC)
How could you skip a link to what every programmer should know about memory? | (Link)
|
http://lwn.net/Articles/250967/ - huge but thorough.
![[User Picture]](http://l-userpic.livejournal.com/116762888/4231862) | From: shlomif 2009-02-14 09:54 am (UTC)
Re: How could you skip a link to what every programmer should know about memory? | (Link)
|
Hi!
Thanks for your comment (but please identify next time). The reasons I didn't were:
-
I still haven't fully read it, and so cannot testify for its quality.
-
As you may notice, my essay did not aim to cover all the specifics of how exactly to optimise, but rather why it is important, and what you should know about optimisations. If we want to be comprehensive about all the possible optimisation techniques, then we I should have probably linked to even more resources.
-
The Drepper article has a strong focus on Linux, gcc and other specific technologies and I aimed to be as general as possible.
But I will consider linking to it in the next revision of the article, when and if I write it, and after I fully read the Drepper article.
| |