Slashdot Mirror


Where Have All The Cycles Gone?

Mai writes "Computers are getting faster all the time, or so they tell us. But, in fact, the user experience of performance hasn't improved much over the past 15 years. This article takes a look at where all the precious processor time and memory are going."

8 of 854 comments (clear)

  1. Re:Nobody give a fig about optimizing by Rorschach1 · · Score: 5, Interesting

    Nobody except embedded programmers. My biggest project of late runs on an 8-bit, 8 MHz CPU with about 7k of Flash and 192 BYTES of RAM. Not megs, not kilobytes, but bytes. That's equivalent to less than three lines worth of text. And the code's written in C, rather than assembly, so while it's easier to maintain, it takes more effort to make sure it stays efficient.

    I think all programming students should have to code for a system like this. It gives you a MUCH greater appreciation for what the compiler is doing for you, and what the consequences of simple changes can be.

  2. Re:Just look at the size of a word document today by EnronHaliburton2004 · · Score: 5, Interesting

    Now I could barely fit a word document.

    And how much of that bloat in Word is useful information?

    If I open word, type the letter 'a', and save the document, it's a 20K document.

    If you type 'a' 2000 times, it's still a 22K document.

    What the heck is in that other 99.9% of the document?

  3. In the old days, ... by Great_Geek · · Score: 4, Interesting
    In the old days, things were done with only a few cycles:

    Apple II (1 MHz 6502) did animated graphics with sound and controlled floppy access while polling the keyboard (The Bard's Tale)

    Amiga (14 MHz 68000) had complete GUI, multi-tasking, on 256K RAM.

    The old saying that "Intel giveth, Microsoft taketh" is about right. The CPU's have gotten faster, with the Microsoft O/S taking more and more cycles to do the same thing.

  4. I can't work 2^(years/1.5) faster... by nick_davison · · Score: 5, Interesting

    I haven't had to set an IRQ or DMA setting in years. I've not had to mess with himem or any other arcane memory configs and boot disks, restarting my entire system each time I want to run a different game.

    Each time I plug in a new joystick and it just works, each time I plug in a new digital camera and it's just there as another drive, each time I alt-tab out of a game, check a walkthrough website, then alt-tab back, I think back to the old days where code was really efficient and didn't do any wasteful background tasks like that.

    I remember helping a friend with a C++ assignment, via the net. Each time, she'd have to exit her telnet program, run Borland's C++ compiler from the command line, check the output, quit the compiler, reopen telnet, reconnect to the MUD we were talking over, then describe what had happened. Now... She'd just show me what's on her desktop via Messenger while we kept chatting.

    And if some cycles get used up doing weird UI gimicks that I'll never use - like making the UI scalable so the partially sighted can use it, I'm willing to trade that.

    For all those reasons, I'm more than happy that my 2^(years / 1.5) faster PC "wastes" all of those extra cycles. And that's before we get on to things like built in spell checkers and real time code debugging as I write it.

    I don't want a 2^(years / 1.5) faster experience. I want all those cycles put in to making things work closer and closer to how I just expect them to work.

    I don't know about anyone else but I can't code 2^(years / 1.5) faster so I wouldn't be able to keep up with that damn responsive text based compiler. On the other hand, I am that much faster overall as I now call an API that adds all that "bloatware" instead of having to code my own damn mouse drivers, my code is largely debugged on the fly and I can't remember the last time I lost several days just trying to format a newsletter in to columns.

    So, before saying the cycles are wasted:

    Pick an every day but semi complex task that people do now. For example: For a homework project, go on line, grab half a dozen graphics and ten blocks of text from those websites, put them all in to a stylishly laid out newsletter format. Do that on a P4, then do it on an a DOS PC from 15 years ago.

    See if matching the same quality of work doesn't take you 2^10 times as long on that old PC, assuming you can even do it at all.

    Those cycles aren't wasted. Sure, we do the same basic tasks but we do them with vastly more flexability and don't have to waste days of our lives wrestling with configs to do what we now consider simple tasks. That's where the speed is.

  5. Re:Nobody give a fig about optimizing by KiltedKnight · · Score: 4, Interesting
    I think all programming students should have to code for a system like this. It gives you a MUCH greater appreciation for what the compiler is doing for you, and what the consequences of simple changes can be.

    I agree completely. I've done some programming for OS-9, and when we were creating some software libraries, we had to do was worry about things like program footprint size and memory allocation/deallocation. We were using a cross-compiler and doing development in C and C++. Something as simple as the order in which you declare the variables could make a noticeable difference in program size. Memory allocation and deallocation had to be done by the top level of the program. The support libraries had to be written to accept a memory block to use and how large it was. The last thing we wanted to do was use up the 4MB of RAM (which had to hold the OS, plus any programs you were running) we had by making large chunks of it unusable because it first was malloc()'ed, then free()'ed. We didn't want to risk having whatever garbage collection scheme existed to be able to properly operate... assuming there even was one. (This was 1997.)

    Of course, if you want speed, you have to learn to take advantage of the "short circuit" of && and ||. While nobody's really going to notice the several nanoseconds you might use up by doing !strncmp(str1, str2, n), when you process millions of rows from a database, it can make a big difference by not forcing a program pointer jump by saying
    if (str1[0] == 'a' && !strncmp(str1, str2, n))...

    The mindset we have now is a direct result of the prevailing attitude that memory is cheap and processors get faster. A friend of mine is no longer asked to interview prospective candidates because he would always ask questions about optimizing code and making it run faster. The candidates nearly always had the look of a deer caught by headlights, and these supposedly knowledgable programmers (interviewee AND interviewers) couldn't answer these questions.

    --
    OCO is Loco
  6. Re:Not Lazy. by Cee · · Score: 5, Interesting

    If you have the entire contents in memory you can be assured of not skipping if there becomes contention for the disk.

    Well, the process can still be paged out. So you don't really gain anything from doing that.

    iTunes on the mac is famous for not skipping no matter the system load, guess why?

    Decoding an mp3 file is not a heavy task, even a 486 CPU would manage that. And Winamp hasn't skipped on my computer either, regardless of load. So I don't think it has anything to do with pre-decompressing the music.

  7. Re:Not Lazy. by BayBlade · · Score: 4, Interesting
    Well there are other issues as well, falling under the "ease of use" umbrella.

    It doesn't have to be a heavy task--I noticed in iTunes you can modify a playing file in all kinds of odd ways--there is no need to lock the file after its been loaded and started playing.
    WinAmp just falls down here--update a playing file's ID tags and it skips (on a modern, otherwise unfetterd system) or try to rename it outside of the application, and it fails miserably because the file is (obviously) locked.

    You may not like Apple's approach, but it works well enough for everyone else.

    --

    The key difference between a Programmer and a Senior Programmer is that one of them is Mexican.

  8. User experience of performance HAS improved by harlows_monkeys · · Score: 4, Interesting
    I disagree that the user experience of performance has not improved over the last 15 years. 15 years ago, I was using a Mac II.

    When I bought a Centris 650 in the early 90's, it was noticably faster--so much faster that I brought it to work to show my boss, as I was sure he would not believe my stories of how fast it was.

    This same thing has happened to me with every generation of PCs, too...it's not just a Mac thing. I buy a new machine, and marvel at how much faster it is.

    Furthermore, I can go the other way to verify this. I still have my Centris 650 in storage, and booted it up a couple years ago. It was so slow that I could not believe that I ever found such a slow machine usable.

    What is really going on is that it doesn't take us long to get used to a fast machine, and since we normally never go back, we don't realize just how much faster things are now.