Quantcast

Maximum PC

It is currently Thu Oct 30, 2014 8:01 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject:
PostPosted: Fri Mar 05, 2010 4:56 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Gadget wrote:
I was curious about why you think C# is a better cross platform environment than Java. Most of the time, when people knock this aspect of Java, they are usually in their 50's and haven't actually used it -- and I know this isn't you! ;)


I don't know that it is specifically better cross platform... just better to program in (IMO). I don't see why it couldn't give Java a run for its money. My biggest complaint about Java, which actually is bigger than my not liking the IDEs... is that it is slow. It has gotten better... it just feels slower than C# in every way.


Top
  Profile  
 
 Post subject:
PostPosted: Sat Mar 06, 2010 12:47 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
Gadget wrote:
I was curious about why you think C# is a better cross platform environment than Java. Most of the time, when people knock this aspect of Java, they are usually in their 50's and haven't actually used it -- and I know this isn't you! ;)


I don't know that it is specifically better cross platform... just better to program in (IMO). I don't see why it couldn't give Java a run for its money. My biggest complaint about Java, which actually is bigger than my not liking the IDEs... is that it is slow. It has gotten better... it just feels slower than C# in every way.

I'm going to assume that you mean slower in terms of performance (not developer productivity). It wouldn't be hard to check some basic performance characteristics in either language. I'll write the Java code up if you write the C# code. Let's do it in a new thread though.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Mar 07, 2010 3:16 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Isn't that going to vary by some hardware? What sort of project should be do? I don't mind coding something... but I'd rather it be a good measure than just anything.


Top
  Profile  
 
 Post subject:
PostPosted: Sun Mar 07, 2010 10:12 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:
Isn't that going to vary by some hardware? What sort of project should be do? I don't mind coding something... but I'd rather it be a good measure than just anything.


Well, I think that we should use a Sun workstation running Solaris 10 as our reference platform. =)

Actually, I'm a bit less concerned with hardware performance than programmer productivity. I'm more than willing to trade oodles of computer cycles in exchange for my time! However, I'm interested in hardware performance enough to spit out some of the more typical idioms. I don't think that a specific hardware platform will matter too much (as long as we use the same algorithms), but we can always test on a couple of different machines and see what happens.

How about...

1) Fill a large array with random integers then sort it then do a binary search a few times. Repeat using strings.

2) Multiply a couple large matrices.

3) Solve TSP for a relatively small instance... maybe 12 cities.

4) We could also do something multi-threaded. It would be interesting to see how the threading in Java compares to C# on Windows.

5) We can also compare the performance of these mini-benchmarks in VirtualBox. That might be interesting.

Maybe someone else will volunteer something as well.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 08, 2010 5:09 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Would be interesting to see this for a couple languages, indeed. I just split off the posts to give us a new thread.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2010 11:59 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Thu Jul 22, 2004 11:11 am
Posts: 5108
Location: RFC 1149 - Pidgeon Network
CrashTECH wrote:
Gadget wrote:
I was curious about why you think C# is a better cross platform environment than Java. Most of the time, when people knock this aspect of Java, they are usually in their 50's and haven't actually used it -- and I know this isn't you! ;)


I don't know that it is specifically better cross platform... just better to program in (IMO). I don't see why it couldn't give Java a run for its money. My biggest complaint about Java, which actually is bigger than my not liking the IDEs... is that it is slow. It has gotten better... it just feels slower than C# in every way.



Performance isn't bad really. Found these a few days ago when trying to figure out what I should use for putting some image manipulation algorithms I had down.
http://www.irrlicht3d.org/pivot/entry.php?id=446
http://zi.fi/shootout/

It does make sense that different platforms or different virtual machine implementations would differ though.

I'd recommend trying that out of virtual box first. You're more layers between the OS and your Java VM - unless your goal is to test virtual box's effect of performance. At the very least, you may want to set the VBOX thread to high priority on the host OS.


Top
  Profile  
 
 Post subject: plug for rosettacode.org
PostPosted: Fri Apr 02, 2010 8:33 pm 
8086
8086

Joined: Fri Apr 02, 2010 8:30 pm
Posts: 1
A useful link for programming language comparison is http://rosettacode.org/


Top
  Profile  
 
 Post subject:
PostPosted: Thu Apr 08, 2010 12:21 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
Hey CrashTech... here are a couple of newer ideas that I've had recently (or more likely really old ideas that I just haven't gotten to yet):

1) Data structures: Good circular, doubly-linked and doubly-linked circular list libs. I don't understand why so many languages seem to omit these types of lists when they're often the most natural representation of my real-life things (eg players sitting at a poker table!). The "missing" data structure that I think would be pretty cool to implement is a heap. We can go ahead and do the standard min/max heap, along with binomial and fib heaps. Fun!

2) I was thinking that a project that can solve a puzzle would be really fun. If you're interested, I'll go ahead an do some research and an initial top-down decomposition. We can then start implementing it piece by piece... haha. =)

3) Computational geometry is one of those insanely hard things to program ("system" programmers are whiny weenies in comparison). One of the biggest problems is that the algorithms are usually described in a very high-level geometric pseudo-code that looks something like "if point D lies inside the circle of points A, B and C then ... else ...". Of course, you read something like this and think, "oh, that's going to be easy". Then you start writing some code and realize that figuring if something is inside a circle results in about five things you didn't expect to have to write and a bunch of degenerate cases. I was thinking it would be pretty cool to create something that let you write the algorithms at the higher-level. Lispy, I know.

4) I was think it would be pretty cool to create a program that could solve one of these types of logic problems. I haven't given it a lot of thought though.

5) A while back, someone linked to a virtual battle bots site that looked pretty cool, except the site required you to write your bot code in this assembly like language (not cool -- I do have other things to do!!!). Anyways, a translator would be really cool. Afterwards, we could whip up some decent bots in a higher-level language and kick some bot butt.

What say thee...


Top
  Profile  
 
 Post subject:
PostPosted: Thu Apr 08, 2010 6:05 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
.NET has LinkedLists... http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx

Never ran into a case where I'd actually use it though. A good old List usually works just fine.

Heaps in C#. Again, I haven't run into an real world use case for it...

I have a Sudoko solver around somewhere... was written a LONG time ago. Probably just after it became "popular". We could design that and see how well the old code works?

Computational geometry could be interesting...

Not sure about the other ones though. :)


Top
  Profile  
 
 Post subject:
PostPosted: Tue Apr 13, 2010 12:16 am 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
CrashTECH wrote:

Not circular lists though... I've already done a basic version in CL. I might flesh that out a bit more sometime later.

CrashTECH wrote:
Never ran into a case where I'd actually use it though.

I tend to do a lot of game and simulations which have players taking turns in a circular fashion (ie the last player is followed by the first player). A non-circular list would work, but the special case code for when you reach the end of the list and want to start back at the beginning is pretty lame.

CrashTECH wrote:
Heaps in C#. Again, I haven't run into an real world use case for it...

Oh, come on... for heaps?! You've been web programming again, huh?! =)

I'll check out that F# implementation of the binomial heap later. I'm surprised that a binary heap wasn't included in the .NET libs. Actually, I'm just assuming that this is true because of the Microsoft employee writing his own. IIRC, the Java API version is kind of a pain to use. Anyways... binary heaps are cool... I suppose... if you're not already familiar with fib heaps! =)

CrashTECH wrote:
I have a Sudoko solver around somewhere... was written a LONG time ago. Probably just after it became "popular". We could design that and see how well the old code works?

That could be interesting. I actually have two versions in Java. I had to basically create a Prolog like environment and solver in one of my grad classes. That was an "interesting" project. The other one is a fairly standard backtracking solution.

Norvig has a good write up for a Sudoku solver using constraint satisfaction and backtracking that I wouldn't mind doing in Java and CL.

CrashTECH wrote:
Computational geometry could be interesting...

Famous last words... =)

I'm pretty booked this week. Maybe we can get something started over the weekend.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Apr 13, 2010 7:52 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Gadget wrote:
I'm pretty booked this week. Maybe we can get something started over the weekend.
Welcome to my life. Let's start small with the Solvers eh? :P


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.