benchmarks? java vs .net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • King Raz

    benchmarks? java vs .net

    The shootout site has benchmarks comparing different languages. It
    includes C# Mono vs Java but not C# .NET vs Java. So I went through
    all the benchmark on the site ...

    The Computer Language Benchmarks site has benchmarks comparing different languages. It includes C# Mono vs Java but not C# .NET vs Java. So...


    Just to keep the post on topic for my friends at comp.lang.c++, how do
    I play default windows sounds with C++?



  • Andrea Francia

    #2
    Please don't feed the troll

    King Raz wrote:
    The shootout site has benchmarks comparing different languages. It
    includes C# Mono vs Java but not C# .NET vs Java. So I went through
    all the benchmark on the site ...
    >
    The Computer Language Benchmarks site has benchmarks comparing different languages. It includes C# Mono vs Java but not C# .NET vs Java. So...

    >
    Just to keep the post on topic for my friends at comp.lang.c++, how do
    I play default windows sounds with C++?
    This guy had trolled the comp.lang.java. programmer and comp.lang.c++
    newsgroup for many weeks with pretentious post about the performance
    comparison of C++ and Java.
    The comparison was done in a not scientific way with only purpose of get
    replies.
    To get replies he/she send many replies to each message he/she receives.

    For reach is target he/she changed his/hers email address many times to
    avoid killfiles.

    I suggest the people not interested who have thunderbird to install the
    "Right click ingore/watch thread" extension and use it for ignoring this
    thread.

    --
    Andrea Francia
    Di tutto, serve più a me scriverlo che a te leggerlo.

    Comment

    • Razii

      #3
      Re: Please don't feed the troll

      On Sat, 31 May 2008 18:09:12 GMT, Andrea Francia
      <andrea.francia @REMOVE-FROM-HERE.ohoihihoih oih.TO-HERE.gmx.itwrot e:
      >This guy had trolled the comp.lang.java. programmer and comp.lang.c++
      >newsgroup for many weeks with pretentious post about the performance
      >comparison of C++ and Java.
      This got to be the funniest post. She (or is that he?) cross-posts
      (spams?) three newsgroups with the subject "Please don't feed the
      troll" and this post was the only response to my thread. Thanks for
      feeding me. She/He also quotes my entire post so anyone who missed my
      first post now read it :) Now I know at least one person read my
      post; that is the brilliant: Andrea Francia, for Italy :)

      Were you born this stupid or did someone hit you with a baseball bal?

      Comment

      • Razii

        #4
        Re: Please don't feed the troll

        On Sat, 31 May 2008 14:24:10 -0500, Razii <fghhf@mail.com wrote:
        >This got to be the funniest post. She (or is that he?) cross-posts
        >(spams?) three newsgroups with the subject "Please don't feed the
        >troll" and this post was the only response to my thread. Thanks for
        >feeding me. She/He also quotes my entire post so anyone who missed my
        >first post now read it :) Now I know at least one person read my
        >post; that is the brilliant: Andrea Francia, for Italy :)
        Arrrgh. I meant "from Italy"

        In any case, if you think I am a troll, why would you feed me by
        responding to my post? Why would you quote my entire post, advertising
        it for free? People who missed the first post now must have read my
        post, thanks to Andrea Francia.

        Well, it seems, the programming-related newsgroups have some of
        the dumbest people on USENET. I wonder why?

        Comment

        • Jeff Higgins

          #5
          Re: Please don't feed the troll


          Andrea Francia wrote:
          I suggest...
          !Thanks for the respam. I'd have never been aware of this
          post had it not been for your announcement and sage advice.

          I'm sure k.rzi thanks you for reposting a link to his site.


          Comment

          • Jon Harrop

            #6
            Re: benchmarks? java vs .net

            King Raz wrote:
            The shootout site has benchmarks comparing different languages. It
            includes C# Mono vs Java but not C# .NET vs Java. So I went through
            all the benchmark on the site ...
            >
            >
            http://kingrazi.blogspot.com/2008/05...enchmarks.html
            >
            Just to keep the post on topic for my friends at comp.lang.c++, how do
            I play default windows sounds with C++?
            Yes. I have ported a variety of benchmarks and found there is no significant
            difference between the performance of .NET and Java. The one result that
            stood out was .NET being 2x faster at the Mersenne Twister PRNG.

            --
            Dr Jon D Harrop, Flying Frog Consultancy
            Business Das perfekte Beratungsgespräch: Tipps und Tricks Sabine Henschel4. Juli 2024 Business Mindset Coach: Ihr Schlüssel zu einem neuen Denken Sabine Henschel4. Juli 2024 Familie Kollegiale Beratung in der Pflege: Zusammen stark Sabine Henschel3. Juli 2024 Familie Was kostet eine Beratung beim Notar wegen Erbrecht: Ein Ratgeber Sabine Henschel2. Juli 2024 Business Was kostet eine

            Comment

            • Razii

              #7
              Re: benchmarks? java vs .net

              On Mon, 02 Jun 2008 10:22:29 +0100, Jon Harrop <jon@ffconsulta ncy.com>
              wrote:
              >Yes. I have ported a variety of benchmarks and found there is no significant
              >difference between the performance of .NET and Java. The one result that
              >stood out was .NET being 2x faster at the Mersenne Twister PRNG.
              ..NET is twice slower in four benchmarks: binarytrees, mandelbrot,
              regexdna, sumcol. .NET was twice faster only in trig related
              benchmark.

              Comment

              • Jon Harrop

                #8
                Re: benchmarks? java vs .net

                Razii wrote:
                On Mon, 02 Jun 2008 10:22:29 +0100, Jon Harrop <jon@ffconsulta ncy.com>
                wrote:
                >>Yes. I have ported a variety of benchmarks and found there is no
                >>significant difference between the performance of .NET and Java. The one
                >>result that stood out was .NET being 2x faster at the Mersenne Twister
                >>PRNG.
                >
                .NET is twice slower in four benchmarks: binarytrees, mandelbrot,
                regexdna, sumcol. .NET was twice faster only in trig related
                benchmark.
                You have not optimized the .NET code:

                On the mandelbrot benchmark, most of the time is spent doing unbuffered IO.
                Use buffered IO and .NET becomes ~10% faster than Java.

                On the regexdna benchmark, the regular expressions are not being compiled.
                Ask for compilation and the .NET is <20% slower than Java.

                The sumcol benchmark is also using unbuffered IO.

                So neither VM is significantly faster overall.

                --
                Dr Jon D Harrop, Flying Frog Consultancy
                Business Das perfekte Beratungsgespräch: Tipps und Tricks Sabine Henschel4. Juli 2024 Business Mindset Coach: Ihr Schlüssel zu einem neuen Denken Sabine Henschel4. Juli 2024 Familie Kollegiale Beratung in der Pflege: Zusammen stark Sabine Henschel3. Juli 2024 Familie Was kostet eine Beratung beim Notar wegen Erbrecht: Ein Ratgeber Sabine Henschel2. Juli 2024 Business Was kostet eine

                Comment

                • Razii

                  #9
                  Re: benchmarks? java vs .net

                  On Tue, 03 Jun 2008 01:23:00 +0100, Jon Harrop <jon@ffconsulta ncy.com>
                  wrote:
                  >On the mandelbrot benchmark, most of the time is spent doing unbuffered IO.
                  >Use buffered IO and .NET becomes ~10% faster than Java.
                  The output was directed to /NULL so I don't see how buffering makes
                  the difference. In any case, post the version that makes it 10%
                  faster. Right now it's 2 times slower.
                  >On the regexdna benchmark, the regular expressions are not being compiled.
                  >Ask for compilation and the .NET is <20% slower than Java.
                  The version that compiles regex is slower that then the version that
                  doesn't compile on Mono



                  That's because the regular expression is used only once and compiling
                  it makes it slower. I doubt the compiled version will be faster on
                  ..NET. It will be slower.
                  >The sumcol benchmark is also using unbuffered IO.
                  Post the right version that buffers then.
                  >So neither VM is significantly faster overall.
                  ..NET is 2 times slower in 4 of the benchmarks. Post the version that
                  makes it faster so we can verify. You haven't done it yet.



                  Comment

                  • Razii

                    #10
                    Re: benchmarks? java vs .net

                    On Mon, 02 Jun 2008 20:21:04 -0500, Razii <klgdfljgb@mail .comwrote:
                    >The version that compiles regex is slower that then the version that
                    >doesn't compile on Mono
                    >
                    >http://shootout.alioth.debian.org/gp...exdna&lang=all
                    Ok, I did try compiled version on .NET and it was faster than
                    uncompiled version.

                    9.539s (uncompiled)
                    5.165s (compiled)

                    the java version was 3.956s


                    Comment

                    • Razii

                      #11
                      Re: benchmarks? java vs .net

                      On Tue, 03 Jun 2008 01:23:00 +0100, Jon Harrop <jon@ffconsulta ncy.com>
                      wrote:
                      >The sumcol benchmark is also using unbuffered IO.
                      I changed the line to

                      using (StreamReader r = new
                      StreamReader(Co nsole.OpenStand ardInput(8192)) )

                      Buffereing 8192 bytes now?

                      It made no difference.

                      4.861s (unbuffered)
                      4.839s (buffered)

                      still two times slower.



                      Comment

                      • Razii

                        #12
                        Re: benchmarks? java vs .net

                        On Tue, 03 Jun 2008 01:23:00 +0100, Jon Harrop <jon@ffconsulta ncy.com>
                        wrote:
                        >On the mandelbrot benchmark, most of the time is spent doing unbuffered IO.
                        >Use buffered IO and .NET becomes ~10% faster than Java.
                        Doesn't this line mean



                        Stream s = Console.OpenSta ndardOutput(102 4);

                        it's buffering already, 1024 bytes?

                        vs this java version



                        it's 3.4 times slower.

                        Comment

                        • Mark Thornton

                          #13
                          Re: benchmarks? java vs .net

                          Jon Harrop wrote:
                          Razii wrote:
                          >On Mon, 02 Jun 2008 10:22:29 +0100, Jon Harrop <jon@ffconsulta ncy.com>
                          >wrote:
                          >>Yes. I have ported a variety of benchmarks and found there is no
                          >>significant difference between the performance of .NET and Java. The one
                          >>result that stood out was .NET being 2x faster at the Mersenne Twister
                          >>PRNG.
                          >.NET is twice slower in four benchmarks: binarytrees, mandelbrot,
                          >regexdna, sumcol. .NET was twice faster only in trig related
                          >benchmark.
                          >
                          You have not optimized the .NET code:
                          >
                          On the mandelbrot benchmark, most of the time is spent doing unbuffered IO.
                          Use buffered IO and .NET becomes ~10% faster than Java.
                          >
                          On the regexdna benchmark, the regular expressions are not being compiled.
                          Ask for compilation and the .NET is <20% slower than Java.
                          >
                          The sumcol benchmark is also using unbuffered IO.
                          >
                          So neither VM is significantly faster overall.
                          >
                          Rather amusing really as unintentional use of unbuffered IO is a
                          frequent cause of Java benchmarks running more slowly than they should.
                          It seems that .NET copied that characteristic as well.

                          Mark Thornton

                          Comment

                          • Jon Harrop

                            #14
                            Re: benchmarks? java vs .net

                            Mark Thornton wrote:
                            Rather amusing really as unintentional use of unbuffered IO is a
                            frequent cause of Java benchmarks running more slowly than they should.
                            It seems that .NET copied that characteristic as well.
                            Yes. I've no idea why they do that. Isn't buffered IO a better default?!

                            --
                            Dr Jon D Harrop, Flying Frog Consultancy
                            Business Das perfekte Beratungsgespräch: Tipps und Tricks Sabine Henschel4. Juli 2024 Business Mindset Coach: Ihr Schlüssel zu einem neuen Denken Sabine Henschel4. Juli 2024 Familie Kollegiale Beratung in der Pflege: Zusammen stark Sabine Henschel3. Juli 2024 Familie Was kostet eine Beratung beim Notar wegen Erbrecht: Ein Ratgeber Sabine Henschel2. Juli 2024 Business Was kostet eine

                            Comment

                            • Razii

                              #15
                              Re: benchmarks? java vs .net

                              On Tue, 03 Jun 2008 07:55:07 +0100, Mark Thornton
                              <mthornton@optr ak.co.ukwrote:
                              >Rather amusing really as unintentional use of unbuffered IO is a
                              >frequent cause of Java benchmarks running more slowly than they should.
                              >It seems that .NET copied that characteristic as well.
                              Harpo was wrong though. mandelbrot is buffered

                              Stream s = Console.OpenSta ndardOutput(102 4);

                              It's still 3.4 times slower.

                              Verify it yourself.



                              vs




                              3.4 times slower.

                              Comment

                              Working...