Thread: cause of code bloat

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    cause of code bloat

    Although indirectly many programmers are concerned about writing code that is fast, light and makes efficient use of resources, I dont see anyone directly trying to identify the cause of code bloat that is creeping up everywhere (both Windows and Linux) and inundating the resources of our hardware. What is the major cause of bloat? Is it the standard or dynamic librarys that code links to? Is it the OS APIs or ABIs? Is it the high level language overhead of languages like C# and Java that are being used more and more?

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Off the top of my head, consider the functionality of both Windows or Linux compared to 10 or 12 years ago. I don't know about you, but I would not want to go back. Of course all the extra nice stuff you use on your computer today has to cost something.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    44
    Quote Originally Posted by kermit
    Off the top of my head, consider the functionality of both Windows or Linux compared to 10 or 12 years ago. I don't know about you, but I would not want to go back. Of course all the extra nice stuff you use on your computer today has to cost something.
    I like XP better than win95 because its more stable. But as far as functionality, there is almost zero difference between XP and win95 for me. If it wasnt for games, I would be using winNT/win2K (which are much lighter) rather than XP.

  4. #4
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Have you tried setting up an internet connection on Win95 lately? Slightly less user friendly than on XP. That is just one small example.

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    What is the major cause of bloat?
    Generally, programmers write for the platform that they are coding on. If your programming machine is a 486, you will probably end up with code far more efficient than if you are coding on the latest Pentium.

  6. #6
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Well, lets look at programs over the ages... originally you coded in the machine code, because that was more effecient (since compiling on a computer was rediculous, they costed to much).

    Then came the age of higher level languages, and compilers, where the compiler could make optimizations, but procedural programing was the way to do things. You couldn't have the bloat of OOP, swaping registers and refering to other places in the program slowed execution time too much.

    Soon we start getting into even faster computers, so fast that we can start using OOP because the devices can comunicate at a better rate. This approach to programming though, makes the program take up more resources and not execute as fast. But it is easier to maintain and develop.

    Now computers are so fast that OOP doesn't slow them down much at all. It makes for even more bloated code to do so, but the bloat is worth it since the code is easier to maintain and has little effect on the resulting program.

    And that is where we are.

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I also think that as libraries got more generic they also necessarily increased in size. Their use also became more common. What yesterday one would have to code themselves, today they can just grab fast-food style in the form of a library. Sometimes just for the sake of a couple of functions.

    Space is no longer a concern given its cost being so low. So I don't so many programmers interested in optimizing for space when speed is the real concern. With development times increasing considerably because of OOP, the method nowadays seems to be to reuse existing code in the form of libraries, not worrying ourselves with what could in fact be stripped down.

    Simply... space is not a factor anymore for most applications except when it makes sense.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM