Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. .NET and RAM

.NET and RAM

Scheduled Pinned Locked Moved The Lounge
csharpdesignjavacomlinux
9 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wParam
    wrote on last edited by
    #1

    I recently got my first experience with .NET, specifically C#. As a person who has only ever used vb and then win32, I like having the ease of vb UI design with C type syntax. However, I can't get past the fact that C#, while being better then java, still is of the mentality that "RAM is cheap, waste as much as you want!" How did this happen? How is it a good thing that devenv.exe has a 164 megabyte address space? I use C and win32 for everything (even making shell extension COM objects--that's loads of fun), because I still care about efficency. How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET? Or should I just look for a job in device driver programming and live there? 3rd year in college, 20 years old, and as stuck in my ways as your average stereotypical 80 year old...

    C C M J 4 Replies Last reply
    0
    • W wParam

      I recently got my first experience with .NET, specifically C#. As a person who has only ever used vb and then win32, I like having the ease of vb UI design with C type syntax. However, I can't get past the fact that C#, while being better then java, still is of the mentality that "RAM is cheap, waste as much as you want!" How did this happen? How is it a good thing that devenv.exe has a 164 megabyte address space? I use C and win32 for everything (even making shell extension COM objects--that's loads of fun), because I still care about efficency. How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET? Or should I just look for a job in device driver programming and live there? 3rd year in college, 20 years old, and as stuck in my ways as your average stereotypical 80 year old...

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I tend to agree, to the point that I never use the postfix ++ operator. But the real question is not the cost of running the dev environment, but the cost to the end user of running the code. Please don't tell me that you're saying the CLR takes up 164 mb ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002

      G 1 Reply Last reply
      0
      • W wParam

        I recently got my first experience with .NET, specifically C#. As a person who has only ever used vb and then win32, I like having the ease of vb UI design with C type syntax. However, I can't get past the fact that C#, while being better then java, still is of the mentality that "RAM is cheap, waste as much as you want!" How did this happen? How is it a good thing that devenv.exe has a 164 megabyte address space? I use C and win32 for everything (even making shell extension COM objects--that's loads of fun), because I still care about efficency. How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET? Or should I just look for a job in device driver programming and live there? 3rd year in college, 20 years old, and as stuck in my ways as your average stereotypical 80 year old...

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        wParam wrote: How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET?

        don't matter no-how. machines keep getting bigger and faster. personally, i'm all for optimizations, small code, fast loops, burnin' cycles while all the young girls "Ooooh!" -c


        Smaller Animals Software, Inc. You're the icing - on the cake - on the table - at my wake. Modest Mouse

        1 Reply Last reply
        0
        • C Christian Graus

          I tend to agree, to the point that I never use the postfix ++ operator. But the real question is not the cost of running the dev environment, but the cost to the end user of running the code. Please don't tell me that you're saying the CLR takes up 164 mb ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002

          G Offline
          G Offline
          Giles
          wrote on last edited by
          #4

          OMG, please don't tell me you use

          i = i + 1;

          Run away!!!!! :laugh: Giles

          P 1 Reply Last reply
          0
          • G Giles

            OMG, please don't tell me you use

            i = i + 1;

            Run away!!!!! :laugh: Giles

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #5

            actually, the correct way is to use

            template <typename _t, _t _o = static_cast<_t>(1)>
            _t successor(_t const & _x)
            {
            return _x + _o;
            }
            i = successor(i);

            This isn't STL compliant, however, since you can't const-iterate over the values of type _t.

            G 1 Reply Last reply
            0
            • W wParam

              I recently got my first experience with .NET, specifically C#. As a person who has only ever used vb and then win32, I like having the ease of vb UI design with C type syntax. However, I can't get past the fact that C#, while being better then java, still is of the mentality that "RAM is cheap, waste as much as you want!" How did this happen? How is it a good thing that devenv.exe has a 164 megabyte address space? I use C and win32 for everything (even making shell extension COM objects--that's loads of fun), because I still care about efficency. How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET? Or should I just look for a job in device driver programming and live there? 3rd year in college, 20 years old, and as stuck in my ways as your average stereotypical 80 year old...

              M Offline
              M Offline
              Matt Philmon
              wrote on last edited by
              #6

              Part of it is laziness certainly. Why should I bother to read a file in small pieces to get when I want (and keep a small footprint) when I know I have enough memory to read the entire thing into memory at once (within reason)? Why bother tweaking my loops to get it to run one time less in a function that's rarely run? Why bother to make sure I use a vs. verses an If-Else when my code is running in Ring 3? Why bother to make sure I use a short vs. an int in my for my "for" loop iterator when I know it's only going to run maybe 10 times at most? These are all things that I WOULD do (and a lot more) if I really had the time I needed on any given project. The truth is, however, that it rarely makes a noticeable difference unless you are running a certain process frequently or certainly down in Ring 0 (driver world). Also, I think a large portion of us on here are developers either: 1) At the college level or lower. 2) In our mid to late twenties or very early thirties. I'm 29 and graduated college in 1997... only 5 years ago. I didn't enter my major until 1993 or 1994 and the only programming I did before that was some old BASIC stuff when I was a kid. By that time computers were already well on their way. People in my age bracket (and actually a decent amount OLDER) never had to do our programs on Punch Cards to be turned in. We never had probably less than 8 MB to worry about. Heck, in college I was programming on a VAX and UNIX system with TONS of resources. Since then all my development has been for targeting machines that are very powerful compared to what some of my really older colleages had to deal with. So, in summary: 1) We're lazy. 2) There's usually not enough time/money to truly optimize. 3) Today's programmer doesn't have the same problems to overcome and NEVER had it so our methodology's have changed significantly. Matt

              1 Reply Last reply
              0
              • W wParam

                I recently got my first experience with .NET, specifically C#. As a person who has only ever used vb and then win32, I like having the ease of vb UI design with C type syntax. However, I can't get past the fact that C#, while being better then java, still is of the mentality that "RAM is cheap, waste as much as you want!" How did this happen? How is it a good thing that devenv.exe has a 164 megabyte address space? I use C and win32 for everything (even making shell extension COM objects--that's loads of fun), because I still care about efficency. How did people here get yourselves away from the machine level and become comfortable with things like a java or .NET? Or should I just look for a job in device driver programming and live there? 3rd year in college, 20 years old, and as stuck in my ways as your average stereotypical 80 year old...

                J Offline
                J Offline
                John Fisher
                wrote on last edited by
                #7

                Where did you get the 164 from? My devenv.exe shows ~35 MB in TaskManager at startup. :confused: Correct me if I'm wrong, but doesn't C# end up having a net effect of using LESS memory? I mean, if you're running 10 .NET applications, they're all sharing the common dlls and normally the distributed .exes and .dlls for .NET are smaller than non-.NET versions... John

                W 1 Reply Last reply
                0
                • P peterchen

                  actually, the correct way is to use

                  template <typename _t, _t _o = static_cast<_t>(1)>
                  _t successor(_t const & _x)
                  {
                  return _x + _o;
                  }
                  i = successor(i);

                  This isn't STL compliant, however, since you can't const-iterate over the values of type _t.

                  G Offline
                  G Offline
                  Giles
                  wrote on last edited by
                  #8

                  Thats the way. Confuse me.:confused: Looks good though. You've passed the audition.:-D Giles

                  1 Reply Last reply
                  0
                  • J John Fisher

                    Where did you get the 164 from? My devenv.exe shows ~35 MB in TaskManager at startup. :confused: Correct me if I'm wrong, but doesn't C# end up having a net effect of using LESS memory? I mean, if you're running 10 .NET applications, they're all sharing the common dlls and normally the distributed .exes and .dlls for .NET are smaller than non-.NET versions... John

                    W Offline
                    W Offline
                    wParam
                    wrote on last edited by
                    #9

                    The colums that gives me that is the "VM Size" column. "Mem usage" (whatever the heck that refers to) shows 66 megs at the moment, but goes as low as 4 if I minimize the ide. Anyone know what "Mem usage" is measuring? Also, this devenv.exe has been running for ... a long time, like a week. brian

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups