D vs VM-based platforms

Dave Dave_member at pathlink.com
Tue May 1 10:18:24 PDT 2007


Tom wrote:
> Mike Parker escribió:
>> Tom wrote:
>>> You people can list a million of (mostly) theoretical benefits in 
>>> having a VM. Java/.NET apps will continue to be damn slow despite of 
>>> these statements (Java the most). That is the simple and self-evident 
>>> truth. Aside from, the idea of having a CPU core for the exclusive 
>>> use of a VM is a *total* waste. I don't trust in hardware solutions 
>>> for software problems.
>>
>> I strongly disagree that Java and C# are 'damn slow'. Have you seen 
>> some of the games out there being developed in both languages? This is 
>> an argument that will last into infinity, I'm sure. There are people 
>> who use languages like Java and C# because they really do see benefits 
>> in doing so. The fact that you don't doesn't make it less true that 
>> they do. I've used Java for a variety of applications. 
> 
> I've seen no big games written in Java/C# (so I can't really hold a 
> position on this ground). Though I've seen *A LOT* of server/client apps 
> done in Java. The speed *IS* a concern, believe me. They ARE definitely 
> slow in comparison to C/C++ apps.
> 

Ok, I know Perl is specialized for this type of thing (with many of the libs. written in C), but for 
small programs handling large chunks of data, Java has rarely been a consideration in the shops I've 
recently worked at. And believe me, it's not for lack of trying because it's easier to find decent 
Java hackers than good C or Perl hackers, IME.

I remember actually scripting something like:

if(file_size > X)
   java -server -XmsY -XmxZ App
else
   java -client App

and having to experiment to set X, Y and Z, and Perl still worked better. What a PITA.

More of the same w/ .NET (speed critical stuff in native C++), although the .NET GC is very good and 
generally hard to beat with hand-crafted mem. mgmt. (again IME).

> On the other hand, I remember a great game that was written in a mix of 
> C++/Python, and was REALLY GOOD and fast: Blade of darkness was its name 
> IIRC. Though, the speed code was C++, so...
> 
>> I have a good feel for what I think it is and isn't suitable for. What 
>> is and isn't beneficial is highly subjective.
>>
>> And really, someone who has never taken the time to roll their sleeves 
>> up and dive into a language can really only speculate about it. How 
>> many times have we seen C++ programmers dis D after glancing at the 
>> feature comparison list without ever writing a line of D code? When 
>> you have actually used a language in anger, you have a much better 
>> perspective as to what its strengths and weaknesses are. 
> 
> Ehm, I work with Java/Perl the better part of the time. So, I think I've 
> roll my sleeves a lot with it. :)
> 
>> The benefits they see are not theoretical. To most Java programmers I 
>> know, speed is rarely a concern (though it does pop up occasionally, 
>> particularly with trig functions). If they weren't satisfied with the 
>> performance characteristics they wouldn't be using it. They are more 
>> often concerned with distribution, or the market penetration of a 
>> particular JRE version.
> 
> I can't deny the benefits, and they're not ALL theoretical. Though, Java 
> has a lot of drawbacks in the performance market. It's really good (yet 
> slow but good) for server side apps.
> 
>> Java and .NET both have a place. The benefits users see from them may 
>> or may not be related to the existence of a VM, but those who do use 
>> the languages usually do see benefits of some kind. Otherwise they'd 
>> all be using C or C++.
> 
> Of course, and coming from the C++ world, that's why I like D so much.



More information about the Digitalmars-d mailing list