473,883 Members | 1,600 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 Tue, 10 Jun 2008 03:22:02 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>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...
F# not as "fast" as java. It's slower than C#, forget Java.


Jun 27 '08 #341
Razii wrote:
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#.
Your F# results are much slower than mine even though your machine is
faster. That proves you are doing something wrong when running the F#.

I suspect you are either still using Mono instead of .NET, still have not
turned compiler optimizations on or you are still using the original Mono
code without the optimizations that I posted. Indeed, you recently cited
only the unoptimized Mono code on the shootout when much faster solutions
were already available elsewhere.

Whichever it is we know your benchmark results for F# are flawed, your
conclusions are therefore flawed, your benchmarking methodology is flawed
and your submissions randomly fail where others do not.

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #342
On Tue, 10 Jun 2008 03:17:19 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>In other words you want to use different Java entrants for different inputs.
So your benchmarking methodology is broken as well as your program...
In other words, I can tune Java GC to fit the situation and make it
faster. You don't have that choice. No wonder .NET is slow.

Jun 27 '08 #343
Razii wrote:
On Tue, 10 Jun 2008 03:30:09 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>Your F# results are much slower than mine even though your machine is
faster. That proves you are doing something wrong when running the F#.

I am doing nothing wrong.
Then why are your F# results four times slower than they should be
(extrapolating from my results)?

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #344
Razii wrote:
On Tue, 10 Jun 2008 03:35:18 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>Here is my optimized F# solution that is 25% faster than the fastest Java
solution:

This doesn't compile

fsc -O3 regexdnaf.fs

regexdnaf.fs(4, 0): error FS0191: Unable to find the file C:\Program
Files\Micros
oft Parallel Extensions Jun08
CTP\System.Thre ading.dll in any of
C:\Windows\Micr osoft.NET\Frame work\v2.0.50727 \
C:\Program Files\Reference Assemblies\Micr osoft\Framework \v3.5
C:\MyApps\shoot out\Agressive
C:\Program Files\FSharp-1.9.4.17\bin.

Unlike yours, C# compiled fine...
You don't even have the necessary software installed on your machine so you
cannot possibly have been posting benchmark results for my optimized
implementations as you claimed.

Install the TPL and the use my optimized implementations .

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #345
Lew <co****@lewscan on.com.invalidw rote:
Mark Thornton wrote:
It is worthwhile selecting one of the low pause collectors if that is
what you need. If you know you will need a 500MB heap then you can save
a bit of time by setting the minimum size to 500MB (this doesn't save as
much time as it used to).

Likewise it is worthwhile switching to a parallel collector in a
multiprocessor environment.

Jon's experience must be limited. Where I work they tune the GC quite
carefully for their various application suites. They definitely find it
worthwhile, given the high volumes they process.
Oh we most definitely tune the VM where I work too. (Heck, we tune just
about everything.) It can certainly be useful. I just think they're
more the exception than the rule. I suspect that tweaking the GC
*isn't* the exception, but getting a significant and predictable
benefit from it is. (I suspect that most companies don't do enough
measurement with accurate loads to properly judge what's an improvement
in the first place.)

Maybe my recollection of the Java defaults is inaccurate, however - I
thought they were pretty good. (In particular, much better than they
used to be in terms of the max heap size, which used to *always* have
to be turned up for any significant server app.)
On a different note, having just opened up my newsreader and found
dozens of new posts on this thread, I've discovered in myself a
complete lack of interest in pursuing all of this any further. Thanks
for the interesting bits (which were almost entirely aside from the
main argument). No doubt I'll be posting in cljp again before long.

--
Jon Skeet - <sk***@pobox.co m>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Jun 27 '08 #346
On Tue, 10 Jun 2008 06:03:58 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>Then why are your F# results four times slower than they should be
(extrapolati ng from my results)?
If you are claiming that F# is 4 times faster than C# even though both
are running on .NET. then your results are not credible. Jon Skeet
numbers for C# were similar to mine.
Jun 27 '08 #347
On Tue, 10 Jun 2008 06:08:22 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>You don't even have the necessary software installed on your machine so you
cannot possibly have been posting benchmark results for my optimized
implementation s as you claimed.
No, I was using your version of binarytrees and it compiled fine. It
was just slower -- slower than C# and definitely slower than Java.

fsc -O3 binarytreesf.fs

binarytreesf.fs (23,30): warning FS0062: This construct is for
compatibility with
OCaml. The expression form 'expr.(expr)' is for use when OCaml
compatibility is
enabled. In F# code you may use 'expr.[expr]'. A type annotation may
be require
d to indicate the first expression is an array. This warning can be
disabled usi
ng '--ml-compatibility', '--no-warn 62' or '#nowarn "62"'

binarytreesf.fs (23,16): warning FS0062: This construct is for
compatibility with
OCaml. Consider using the overloaded operator 'int' instead. This
warning can b
e disabled using '--ml-compatibility', '--no-warn 62' or '#nowarn
"62"'

..NET is slow here. No twist will change that.

Jun 27 '08 #348
Lew
Lew wrote:
>Where I work they tune the GC quite
carefully for their various application suites. They definitely find it
worthwhile, given the high volumes they process.
Jon Skeet [C# MVP] wrote:
Oh we most definitely tune the VM where I work too. (Heck, we tune just
about everything.) It can certainly be useful. I just think they're
more the exception than the rule. I suspect that tweaking the GC
*isn't* the exception, but getting a significant and predictable
benefit from it is. (I suspect that most companies don't do enough
measurement with accurate loads to properly judge what's an improvement
in the first place.)
I work on a fairly large-scale system involving several load-balanced,
multi-processor servers and associated stuff. Those ops guys do measure
outcomes, and have various tweaks that help overall. They do have
requirements amenable to tuning, such as that throughput is more important
than pause time.
Maybe my recollection of the Java defaults is inaccurate, however - I
thought they were pretty good. (In particular, much better than they
used to be in terms of the max heap size, which used to *always* have
to be turned up for any significant server app.)
Like many shops, where I am they are still on Java 1.3 in production.

I suspect that when they finally transition to 5 (just in time for its
funeral!) that the tuning will change.
On a different note, having just opened up my newsreader and found
dozens of new posts on this thread, I've discovered in myself a
complete lack of interest in pursuing all of this any further. Thanks
for the interesting bits (which were almost entirely aside from the
main argument). No doubt I'll be posting in cljp again before long.
Unusually for this recurring thread, much of the discussion has been useful,
relevant and interesting, particularly your posts, Mr. Skeet. I don't care
much about the "shootout" results, but the concomitant discussion of how to
tune Java and C# yields some fruit.

--
Lew
Jun 27 '08 #349
Razii wrote:
On Tue, 10 Jun 2008 06:03:58 +0100, Jon Harrop <jo*@ffconsulta ncy.com>
wrote:
>>Then why are your F# results four times slower than they should be
(extrapolatin g from my results)?

If you are claiming that F# is 4 times faster than C# even though both
are running on .NET. then your results are not credible.
For completely different programs?

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
Jun 27 '08 #350

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
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...
1
10845
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10412
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7970
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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.