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. Other Discussions
  3. The Insider News
  4. Clash of the unlikely: C# versus... RealBASIC?

Clash of the unlikely: C# versus... RealBASIC?

Scheduled Pinned Locked Moved The Insider News
csharpquestionc++phpcom
7 Posts 6 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.
  • T Offline
    T Offline
    Terrence Dorsey
    wrote on last edited by
    #1

    Tomm’s Tinkerings[^]:

    I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

    More evidence that how you code is just as important as what you code it in?

    K J L N M 5 Replies Last reply
    0
    • T Terrence Dorsey

      Tomm’s Tinkerings[^]:

      I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

      More evidence that how you code is just as important as what you code it in?

      K Offline
      K Offline
      kornman00
      wrote on last edited by
      #2

      Shouldn't postings in 'The Insider News' be 'new' news ;p?

      1 Reply Last reply
      0
      • T Terrence Dorsey

        Tomm’s Tinkerings[^]:

        I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

        More evidence that how you code is just as important as what you code it in?

        J Offline
        J Offline
        jim lahey
        wrote on last edited by
        #3

        I've had the misfortune to use RealBASIC in the past. I remember the IDE not letting you view the code for a form, class or whatever in one piece. Instead you had to choose a method or property declaration from a dropdown at the top of the code window, and you could only see that. An unintuitive and fundamentally unproductive IDE complete with a language that is VB6 more or less. Bleh.

        1 Reply Last reply
        0
        • T Terrence Dorsey

          Tomm’s Tinkerings[^]:

          I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

          More evidence that how you code is just as important as what you code it in?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          First paragraph, highlighted in red in the original article;

          Edit: This article has just been featured on HackerNews, but it’s very old. The code I used here for the comparison is suboptimal – the results here should not be considered accurate. I’m leaving this here for archive purposes only.

          Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

          1 Reply Last reply
          0
          • T Terrence Dorsey

            Tomm’s Tinkerings[^]:

            I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

            More evidence that how you code is just as important as what you code it in?

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #5

            Broken link!

            tomgrimshaw.wordpress.com is no longer available.

            The authors have deleted this blog.

            Regards, Nish


            My technology blog: voidnish.wordpress.com

            K 1 Reply Last reply
            0
            • N Nish Nishant

              Broken link!

              tomgrimshaw.wordpress.com is no longer available.

              The authors have deleted this blog.

              Regards, Nish


              My technology blog: voidnish.wordpress.com

              K Offline
              K Offline
              kornman00
              wrote on last edited by
              #6

              I still have the associated source in my history Original C# code: http://pastebin.com/f287a2609[^] RealBASIC code: http://pastebin.com/f22e9ffa2[^] One of the optimizations to the C# code done by a commenter: http://pastebin.com/3765W95A[^] (I guess RealBASIC doesn't have an equivalent to Stopwatch?) I think there were a few other code postings but that last one was the only submission I took a look at before realizing how old this blog entry was...

              1 Reply Last reply
              0
              • T Terrence Dorsey

                Tomm’s Tinkerings[^]:

                I use C# with .NET or Mono on a daily basis. To be honest, I love the language. It’s clean, efficient and simple. Yesterday however, I suggested on IRC that whilst C# has definately benefited OpenSim with its simple debugging, rapid development and wide selection of prebuilt classes to choose from, it was not a great choice for what is, essentially, a high performance application. Upon stating this, a couple of people chirped up to tell me that while a language like C or C++ would provide better performance, I would be suprised how far JIT compilers have come. I decided to put this to the test.

                More evidence that how you code is just as important as what you code it in?

                M Offline
                M Offline
                Member 4608898
                wrote on last edited by
                #7

                Anything can run on a high spec machine. If you want to know how efficient a language is, try running the executables on say WXP or W2K with 256Mb on a PIII. The difference is that some programs written in languages like Java and C# can take forever to run on environments with low resources, even in JIT. If the code does not involve any libraries, then I agree, JIT C# is as fast as anything else you can get on the market. Once you start going into .net framework, what happens is anyone's guess. Some things are faster than libc, some are a lot slower. eg C# dictionary vs C++ map vs C bsearch vs MFC map vs MS C++ hashmap. To use any language in a real-time system, you need all your new's up front and ensure no garbage collection once it starts running. The random GC really screws the system big time. I have used C# in realtime systems before (just for fun at lunchtime). Scary what happens when GC kicks in - the machine actually starts juddering. Someone told me my aeroplane would have dropped out of the sky, possibly gone into a steep dive, if that had happened in a real life situation!

                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