[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: JAVA vs. C in speed

I remember an article on slashdot a couple of months
back which had some numbers on the issue ur talking
abt ... basically, it said there werent much
differences in the time taken for java and c code
(equivalent source). make ur own conclusions ...

--- OxCAFE  BABE <cafebabe@xxxxxxxxxxxxxx> wrote:
> Hi all!
> I'm doing some number crunching using JAVA in an
> application. I'm using a large number of Arrays ,
> and thats where I thought my JAVA code will be
> spending so much of its time (as JAVA checks every
> Array access for ArrayIndexOutOfBoundsException).
> So, in order to improve the speed of my program I
> coded the routines as JNI native stubs, and timed
> it. 
> To my surprize, the JAVA code is as fast as the C
> code as far as number crunching and Arays are
> involved! Calling the native methods takes an
> additional 1/2 ms, and so eventually the pure JAVA
> code seems to be running faster, atleast with my
> experiments!
> Have others also experienced such issues?
> Does anyone know of good relaible comparisons
> between JAVA and C wrt speed ? If yes, 0xCAFEBABE
> would be glad
> to know about them
> Thanks,
> 0XcafeBAbe
> _________________________________________________
> Chat with your friends as soon as they come online.
> Get Rediff Bol from
> http://www.rediff.com/messenger/messenger.htm
> Participate in crazy Re.1 auctions at
> http://www.rediff.com/auctions
> For information on this and other Linux India
> mailing lists check out
> http://lists.linux-india.org/

Do You Yahoo!?
Get Yahoo! Mail ? Free email you can access from anywhere!