Code center > Darwinbots3

Release date

<< < (5/11) > >>

jknilinux:
Hi nums,

go to getpclinuxos.com . It is an extremely good, extremely easy linux distro, so just install it on a tiny partition of your hard-drive or on an emulator, or on a thumbdrive, and problem solved. Also, isn't java like THE_MOST_PORTABLE_LANGUAGE_EVER? No matter what machine you're on, java will run with no modifications. With C#, though, it sounds like you have to actually work to make it portable.

EricL:
You pay about a 20% perf penalty for managed code of any ilk.  All that garbage collection and memory management and range checking the runtime does for you is nice, but it isn't free.  This is one reason operating systems and database servers and similar engine code such arn't written in managed code.  

DB is mostly an engine, mostly systems code.  A portable lanaguage like C or C++ would be fine, but IMHO, you want native compiles to specific platforms for engine code.

Moonfisher:
I don't think garbage collection is worth 20%... although I'd immagine that number is a litle exagerated...
But generaly a destructor rarely takes any time to make... and it may take a litle longer to propperly manage objects and pointers, but it's also nice to know it's being done right (A good performance test should make it easy to fix any leaks you may have caused). And I guess debates about C++ vs Java is nothing new, and I bet there's tons of stuff I know nothing about. But I know you still have to be carefull in java not to make any pointer loops and other stuff the garbage collector can't handle.
But in the end, I find C and C++ to be a lot easyer and more intuitive than Java. I have a real feeling that I can do anything I wan't, and I can either make it myself or find a library that does it for me. I also have a hard time imagining that you can make as efficient code in Java without having to be as thorough as in C. In the end I just dislike the odd syntaxes and "wierd stuff" you need to do when using Java libraries, could just be a personal preference, but when I use a C library it makes sence to me, that's not always the case with Java...
Appart from that any larger framework I ever worked with has always been in C++, not that I've tryed a lot (Unreal Engine 3 and Kynapse), so it's easyer for me, and I think the performance and compatibility of C++ shouldn't be the issue...

A history of popular FPS game engines, noticed Crysis is in C++, as are most of them...
http://upload.wikimedia.org/wikipedia/comm...8/Fpsengine.svg

But I actualy started with Java and I still found C to be a lot easyer when I first tryed it... maybe it's just me... just seemed like you need to know half the lib functions for Java before you can use it effectively... and all the dev environments I tryed where awfull...

EricL:

--- Quote from: Moonfisher ---I don't think garbage collection is worth 20%... although I'd immagine that number is a litle exagerated...
--- End quote ---
It's not, at least it wasn't a few years ago when I worked in the Windows kernal group.  Managed code does a lot more than garbage collection such as object sandboxing.  Very usefull stuff for allowing large numbers of people to collaborate effectivly on a large project or for running third party code inproc without security concerns.  Not much use for DB as currently designed.  If bots were code objects like in Terrarium (written in C#) then that would be another matter.   Features are great if you need/use them.  Their baggage if you don't.

Numsgil:
I think it's closer to 10% than 20%.  That's been my experience (ported a 3D app from C++ to C#, both using Ogre (the C# version used a managed wrapper), and the experience of most people I've talked to.  The actual number varies with whatever is going on, but 10% seems to be the magic number.  And of course only 1% of the code uses 99% of the execution time in any CPU bound project (like Darwinbots), so that 10% overhead is very easily reduced if you can write key parts of your code in C++ or assembly or something like that.  So I'm very specifically ignoring any issues with constant code overhead, and instead entirely concentrating on the program's Big O.

I don't know much about Java, so it was never really in the running.  What I like about C# are things like run time reflection (ie: easily determining the type of an object at run time.  You can do this in C++, but there's a whole bunch of limitations that prevent me from doing fun things like BasePair bp = new BasePair("cond") easily), the huge .NET library, semi-easily interacting with unmanaged code (ie: with a little bit of work I can link with a regular old C++ library), greatly expanded exception handling (including things like a stack trace and line number), etc.  Garbage collection isn't something I either need or don't need.  It has its perks and downsides, like anything else, but it's far from the deciding factor.  If you like C++, and you spend time in C#, I can't walking away without good things to say about C#.  It's just a lot of fun to code in, and specifically has addressed language issues with C++ (I'm looking at you explicit cast conversions!).

gymsum, I'm actually getting pretty close to where a tester would be nice.  I'll create a topic in a month or so when I get that far (fingers crossed).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version