473,883 Members | 1,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ...

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++?

Jun 27 '08
358 13276
On Mon, 09 Jun 2008 16:56:48 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>In contrast, I have posted numerous reproducible counter examples
demonstratin g the GC never being invoked.
You have posted no such thing other than making a fool out of yourself
in public.
Jun 27 '08 #321
On Jun 10, 1:22*am, King Ripper<fartsgal ore...@gmail.co mwrote:
Yawn.
Hey Ratboy. I know youre tired mate, but now what you want to do is
get some beans. Get plenty of them and eat em. Then wash em down with
some mashed potato. Then get a hunk of salami. eat the lot. Then what
you want to do is jump up and down. Then you gotta hold it, you got
hold it as long as you can. Then when you can't hold it in any more...
Let it go bud...

You'll get a massive ripper, but dont forget to keep some tissues
handy in case you follow through and flood out your troll cave.

regards
Andy Little
Jun 27 '08 #322
On Tue, 10 Jun 2008 01:18:40 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>The program used to work for n=22 on my machine. With your tweak it no
longer works for n=22 because it runs out of heap space.
The program works fine with n=22 with my options. Nothing is "broken."

java -server -Xms512m -Xmx512m -XX:NewRatio=1 binarytrees 22
stretch tree of depth 23 check: -1
8388608 trees of depth 4 check: -8388608
2097152 trees of depth 6 check: -2097152
524288 trees of depth 8 check: -524288
131072 trees of depth 10 check: -131072
32768 trees of depth 12 check: -32768
8192 trees of depth 14 check: -8192
2048 trees of depth 16 check: -2048
512 trees of depth 18 check: -512
128 trees of depth 20 check: -128
32 trees of depth 22 check: -32
long lived tree of depth 22 check: -1

real 7m0.076s

In fact, the with n=22, the better argumenst are:

Jun 27 '08 #323
On Mon, 9 Jun 2008 17:56:43 -0700 (PDT), kwikius
<an**@servocomm .freeserve.co.u kwrote:
>
regards
Andy Little
PLONK
Jun 27 '08 #324
Razii wrote:
On Tue, 10 Jun 2008 01:18:40 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>The program used to work for n=22 on my machine. With your tweak it no
longer works for n=22 because it runs out of heap space.

The program works fine with n=22 with my options. Nothing is "broken."
Your program is broken:

$ time java -server -Xms512m -Xmx512m -XX:NewRatio=1 binarytrees 22
Exception in thread "main" java.lang.OutOf MemoryError: Java heap space
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:58)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.access$00 0(binarytrees.j ava:39)
at binarytrees.mai n(binarytrees.j ava:19)

real 0m34.124s
user 0m24.458s
sys 0m3.112s

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #325
Razii wrote:
On Mon, 09 Jun 2008 16:56:48 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>On a different machine with a different VM the exact same
test might very well fail.

It won't fail. You have posted ZERO evidence that the test fails ony
any machine.
Here is your program failing on my machine (again) where others succeeded:

$ time java -server -Xms512m -Xmx512m -XX:NewRatio=1 binarytrees 22
Exception in thread "main" java.lang.OutOf MemoryError: Java heap space
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:58)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.bottomUpT ree(binarytrees .java:51)
at binarytrees$Tre eNode.access$00 0(binarytrees.j ava:39)
at binarytrees.mai n(binarytrees.j ava:19)

real 0m34.124s
user 0m24.458s
sys 0m3.112s

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #326
Razii wrote:
On Tue, 10 Jun 2008 02:51:01 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>Your program is broken:

It isn't "broken" on mine as I showed.
Working only some of the time isn't good enough.
If on your computer it doesn't run, increase the heap-size. Nothing
is "broken." C# has access to the entire ram (and it uses over 700 MB with
n=22).
In other words you want to use different Java entrants for different inputs.
So your benchmarking methodology is broken as well as your program...

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #327
On Tue, 10 Jun 2008 02:59:42 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>The only significant difference is the last result where .NET is >2x faster
than Java and I had to use the original Java because your tweaked version
is broken and cannot even handle that computation.
Your numbers are not reproducible on my computer. They are not
reproducible on Skeet computer. .NET is slower, much slower, on my
machine. F# is slower than C#.
Jun 27 '08 #328
Razii wrote:
On Tue, 10 Jun 2008 02:53:16 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>Here is your program failing on my machine (again) where others succeeded:

Since you have posted other claims that were not reproducible, I will
take this claim with a grain of slat unless someone else verifies it.
The program works fine on my computer.

Second, C# has access to entire RAM. Increase Xmx and Xms to 1600m
and java version again is faster...
So the F# solution is not only as fast as Java but it doesn't need to be
changed every time you alter the input. I think we have a clear winner...

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #329
On Tue, 10 Jun 2008 02:59:42 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>So .NET is 25% faster than Java here as well.
..NET is 25% slower on regexdna and Harpo admitted it last time in the
other thread. Note that now Harpo has changed his tune and is claiming
that .NET is faster in regexdna.

He did the same thing with binarytrees. Earlier he admitted that Java
is 2x times faster in binarytrees.

http://groups.google.sh/group/comp.l...9c011eb5833dec

"Java is only 2x faster in one benchmark (binarytrees) here and that
is not a well formed benchmark."

Later he changed his claim and started claiming .NET is faster. I
don't get these numbers, nor did John Skeet. F# is slower than C# on
..NET.

He has yet to post C# version of Mersenne Twister too, where he
claimed it's twice faster.

Jun 27 '08 #330

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

80
3572
by: tech | last post by:
Hi, i have the following problem In file1.h namespace A { class Bar { void foo();
318
11198
by: King Raz | last post by:
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/shootout-c-net-vs-java-benchmarks.html Just to keep the post on topic for my friends at comp.lang.c++, how do I play default windows sounds with C++?
0
9936
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9791
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7123
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5990
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4215
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.