[Bf-taskforce25] Complete Rewrite

joe joeedh at gmail.com
Sun Mar 22 18:41:42 CET 2009


You're kindof missing the point.  I'm aware Java works great with
numerical stuff, kindof the same way python's psyco does.  It doesn't
mean Java is as fast as C, since most people won't be making code that
can take advantage of it.

As a practical matter, for large applications C is better then Java.
That is what's important, in my mind.  I don't care if you could
compute PI faster in Java then C; if an app like Blender wouldn't be
as fast, then I don't really care.

Lots of people take blog articles like that, and present it as
evidence Java is always better then C.  Those articles tend to leave
out just how contrived the test cases are (in that article, they say
it's a "perfect example", when it clearly is only useful for numerical
code, which in my opinion makes it a contrived test case if your
presenting it as a general benchmark).

Joe

On Sat, Mar 21, 2009 at 8:54 PM, Jonathan Merritt <jmerritt at warpax.com> wrote:
> Hi Joe,
>
> On 22/03/2009, at 4:36 AM, joe wrote:
>> That is called Maya.  It's slow as hell and takes easily 5 times the
>> RAM blender does. :)
>>
>> Using C for an app like Blender is necessary, since you can't get
>> the same RAM/speed out of most other languages.  Some of them can
>> compile to native code, but that doesn't mean they're as fast; a
>> high-level object-oriented language tends to have overhead from both
>> the garbage collection and the object model implementation.  Python
>> is especially bad this way, but so is java, and it's been optimized
>> to hell.
>
> I agree with most of what you're saying (esp. regarding memory use),
> but in my experience, Java (Sun's JVM with hotspot) has been
> performing about as well as C for numerical computation for some time
> now.  There is a bit of contention surrounding this topic, since it
> does partly depend on CPU cache usage, etc., and also on the C
> compiler used.  But you paint the picture that Java is horrendously
> slow, which simply isn't the case any more:
>     http://blogs.sun.com/dagastine/entry/java_is_faster_than_c
>     (that partisan blog post is from 2006)
>
> Groups at CERN and NIST have invested time in developing Java
> numerical libraries and applications.  Although numerical Java still
> has very little traction, it is being used successfully.
>
> Still, all of this is an academic discussion because Blender's current
> code base is in C already! :-)
>
> Jonathan Merritt.
>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>


More information about the Bf-taskforce25 mailing list