• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

VB6 - Cobol of the future?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    There is a so-called "boxing" in C# - I think it is actually introduced in Java now. Basically, in C# some primitive types that map very well to CPU (ie int,long) are treated specially not like reference based objects, this allows to save memory and add some speed. I think in Java in v6 they moved to this concept as well.

    Also generics in C# are better implemented to have very good performance because it is all checked at compile time so compiler gets pretty much native code, just the way generics (templates) are supposed to work.

    Most of all I like pointers - you need to make special effort to use those, and I do very rarely, however in those cases I typically got 2 times higher performance from the same CPU intensive bit than when same code without pointers. 2 times is a lot - C# itself is very fast, but with pointers you can make real CPU intensive stuff fly.

    Comment


      #32
      Originally posted by thunderlizard View Post
      Not this one (or I hope not, for everybody's sake). These are the kind of systems where the requirements exist only in the head of somebody who left the company after a nervous breakdown 8 years ago. They're the worst candidate for offshoring.
      I think what will happen is that these things will be rewritten altogether - most likely in India: it would be sold as "cheaper" price overall for getting new "clean" code in Java or .NET.

      I am not saying I want it - I just think it will happen.

      Comment


        #33
        Originally posted by AtW View Post
        There is a so-called "boxing" in C# - I think it is actually introduced in Java now. Basically, in C# some primitive types that map very well to CPU (ie int,long) are treated specially not like reference based objects, this allows to save memory and add some speed. I think in Java in v6 they moved to this concept as well.

        Also generics in C# are better implemented to have very good performance because it is all checked at compile time so compiler gets pretty much native code, just the way generics (templates) are supposed to work.
        Ah yes. Boxing is syntax sugar for wrapping and unwrapping primitive types (and structs in C#) inside objects. It is not a performance optimization. However .NET has structs - they let you allocate and reference an array of objects with a single operation, which is impossible in Java and it is indeed extremely annoying if you have to write high-performance code.

        Comment


          #34
          Originally posted by AtW View Post
          There is a so-called "boxing" in C# - I think it is actually introduced in Java now. Basically, in C# some primitive types that map very well to CPU (ie int,long) are treated specially not like reference based objects, this allows to save memory and add some speed. I think in Java in v6 they moved to this concept as well.

          Also generics in C# are better implemented to have very good performance because it is all checked at compile time so compiler gets pretty much native code, just the way generics (templates) are supposed to work.

          Most of all I like pointers - you need to make special effort to use those, and I do very rarely, however in those cases I typically got 2 times higher performance from the same CPU intensive bit than when same code without pointers. 2 times is a lot - C# itself is very fast, but with pointers you can make real CPU intensive stuff fly.
          There was another programming language that had int, long etc. as native types, and had pointers and templates. Also you got complete control over garbage collection. What was it called now? That's right: C++.

          I'm not entirely convinced of the benefits to all this (other than generating money for IT contractors).
          Will work inside IR35. Or for food.

          Comment


            #35
            Originally posted by bored View Post
            It is not a performance optimization.
            Of course it is! The whole point of boxing is that you avoid reference type, which is heavier than native types. Say I am heavy now into 64-bit systems, so I can tell you how painful it is to have references to objects, each of which (references) is 64 bits, grrr, big memory loss. Structs are also good for sure, they are also "value" type, which is where boxing helps. I don't actually think Java has got concept of "primitive" value types like ints that take 4 bytes of memory: but they might have changed in current version, I am not following it too closely.

            VectraMan: C++ has got these things, but it has got lots of drawbacks, I don't want or need pointers all the time - I only use them in maybe 0.1% of code, but there it matters as that code is responsible for more of time.

            One of the tulipy things on Windows is System Cache - the damn thing is causing big trouble in many cases and there is no easy way to switch it off, however I found one, but it involves some Win32 specific flags, but at least I can do it in C# - painfully, but the effect was great - my app actually reads data extremely fast, when you app processes terabytes of data in parallel it makes big difference.

            Comment


              #36
              Originally posted by VectraMan View Post
              There was another programming language that had int, long etc. as native types, and had pointers and templates. Also you got complete control over garbage collection. What was it called now? That's right: C++.

              I'm not entirely convinced of the benefits to all this (other than generating money for IT contractors).
              Memory leaks anyone?

              Null pointer reference anyone?

              Buffer overflow anyone?

              Comment


                #37
                Originally posted by DimPrawn View Post
                Memory leaks anyone?
                Present in .NET.

                Originally posted by DimPrawn View Post
                Null pointer reference anyone?
                Present in .NET.

                Originally posted by DimPrawn View Post
                Buffer overflow anyone?
                Also present in .NET - with bad pointer use OR baseline libs have buffer overflow in themselves.

                Comment


                  #38
                  To Joe Black

                  Joe, I suspect the small size of your thumbnails is the key to speed. Mine are much bigger, maybe thumbnails is not a good term. I did try the getthumbnail method, can't recall the details of why I gave up on it now but think there was major problem with the quality of the image with that method.

                  Still, have sent you some links to images, if there is anything in your code that would do it quicker, most grateful. I have got the speed acceptable but quicker would be nicer. Currently it creates 14 such thumbnail pages, this will obviously get bigger if we add to the bug database.
                  bloggoth

                  If everything isn't black and white, I say, 'Why the hell not?'
                  John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

                  Comment


                    #39
                    Originally posted by DimPrawn View Post
                    Memory leaks anyone?

                    Null pointer reference anyone?

                    Buffer overflow anyone?

                    Maybe if you're an amateur ;-)

                    Actually I do see the benefits to all this managed stuff (and you can do .NET in C++ so it's not a language argument). But it is ironic to be talking about one interpreted script language giving better performance than another interpreted script language when you could use native code. Does C# have _asm?

                    It's typical of the Java/.NET apologists that they think C++ means scary void pointers all the time, and therefore can't be used to produce reliable code. I was somewhat shocked to learn that neither Java or C# have const types: a major step backwards in reliability terms IMO.
                    Will work inside IR35. Or for food.

                    Comment


                      #40
                      To give it its crappy due, I did some testing of memory and found no leaks in VB.net. Or at least not that the memory thingy told me about anyway.
                      bloggoth

                      If everything isn't black and white, I say, 'Why the hell not?'
                      John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

                      Comment

                      Working...
                      X