public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Performance of GCJ JNI and CNI
@ 2009-08-26 10:38 Vaijayanthi Mala Suresh
  2009-08-26 15:51 ` David Daney
  0 siblings, 1 reply; 4+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-08-26 10:38 UTC (permalink / raw)
  To: java

Hi,

I have converted an application which makes more number of native
calls that was written using proprietary JVM compatible with version
Java 1.1 using GCJ.

I had tried to convert this application using GCJ + JNI as well as GCJ + CNI.
I don't see much performance improvements after using the GCJ
precompilation. ie., not using the interpreter.

Can someone help me to understand why there is no performance improvement.

I am compiling this for MIPS platform.

Thanks
Mala

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Performance of GCJ JNI and CNI
  2009-08-26 10:38 Performance of GCJ JNI and CNI Vaijayanthi Mala Suresh
@ 2009-08-26 15:51 ` David Daney
  2009-08-27  8:56   ` Vaijayanthi Mala Suresh
  0 siblings, 1 reply; 4+ messages in thread
From: David Daney @ 2009-08-26 15:51 UTC (permalink / raw)
  To: Vaijayanthi Mala Suresh; +Cc: java

Vaijayanthi Mala Suresh wrote:
> Hi,
> 
> I have converted an application which makes more number of native
> calls that was written using proprietary JVM compatible with version
> Java 1.1 using GCJ.
> 
> I had tried to convert this application using GCJ + JNI as well as GCJ + CNI.
> I don't see much performance improvements after using the GCJ
> precompilation. ie., not using the interpreter.
> 
> Can someone help me to understand why there is no performance improvement.
> 

It is doubtful, we know nothing about the application.

If most of the application time were spent in the native methods, 
optimizing the other parts would not help much.

If you are allocating a lot of memory, the memory allocator and GC can 
dominate your application time.


> I am compiling this for MIPS platform.

That is notable in and of itself.

David Daney

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Performance of GCJ JNI and CNI
  2009-08-26 15:51 ` David Daney
@ 2009-08-27  8:56   ` Vaijayanthi Mala Suresh
  2009-08-27 11:50     ` Andrew Haley
  0 siblings, 1 reply; 4+ messages in thread
From: Vaijayanthi Mala Suresh @ 2009-08-27  8:56 UTC (permalink / raw)
  To: David Daney; +Cc: java

Hi David,

Thanks for your reply.

In case of more time spent on Java, what can be done to improve the performance.

While using CNI do we need to consider anything special like
optimization flags, gcj configuration flags, initialization steps,
etc.,

I would like to reduce the startup time as well. It takes some time
before starting the application for performing the Registration of
all the java packages(packages other than standard).

Can you please help me with some optimization techniques which I would
like to try it out for any performance improvements.

Thanks
Mala

On Wed, Aug 26, 2009 at 9:20 PM, David Daney<ddaney@caviumnetworks.com> wrote:
> Vaijayanthi Mala Suresh wrote:
>>
>> Hi,
>>
>> I have converted an application which makes more number of native
>> calls that was written using proprietary JVM compatible with version
>> Java 1.1 using GCJ.
>>
>> I had tried to convert this application using GCJ + JNI as well as GCJ +
>> CNI.
>> I don't see much performance improvements after using the GCJ
>> precompilation. ie., not using the interpreter.
>>
>> Can someone help me to understand why there is no performance improvement.
>>
>
> It is doubtful, we know nothing about the application.
>
> If most of the application time were spent in the native methods, optimizing
> the other parts would not help much.
>
> If you are allocating a lot of memory, the memory allocator and GC can
> dominate your application time.
>
>
>> I am compiling this for MIPS platform.
>
> That is notable in and of itself.
>
> David Daney
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Performance of GCJ JNI and CNI
  2009-08-27  8:56   ` Vaijayanthi Mala Suresh
@ 2009-08-27 11:50     ` Andrew Haley
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Haley @ 2009-08-27 11:50 UTC (permalink / raw)
  To: Vaijayanthi Mala Suresh; +Cc: David Daney, java

Vaijayanthi Mala Suresh wrote:

> In case of more time spent on Java, what can be done to improve the performance.
> 
> While using CNI do we need to consider anything special like
> optimization flags, gcj configuration flags, initialization steps,
> etc.,
> 
> I would like to reduce the startup time as well. It takes some time
> before starting the application for performing the Registration of
> all the java packages(packages other than standard).

I'm surprised by that.  All that class registration does is add
classes to a table.  All the initialization happens later, when
the class is first used.

> Can you please help me with some optimization techniques which I would
> like to try it out for any performance improvements.

None of us has the slightest idea what might be causing your problems.
Obviously, you will be compiling everything with -O2 or better.

We need you to send us an example of poor performance.

Andrew.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-27 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26 10:38 Performance of GCJ JNI and CNI Vaijayanthi Mala Suresh
2009-08-26 15:51 ` David Daney
2009-08-27  8:56   ` Vaijayanthi Mala Suresh
2009-08-27 11:50     ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).