osdir.com
mailing list archive

Subject: Re: java.lang.String class in Dalvik - msg#00076

List: android-platform

Date: Prev Next Index Thread: Prev Next Index

On Jun 2, 7:37 pm, Mercury <bao...@xxxxxxxxx> wrote:
> As I found that at the current, the methods of java.lang.String class
> of Dalvik are mostly implemented by Java code and maybe it makes the
> performance reduce. So my thinking is that can we move the
> implementation to JNI to improve performance?

Four String methods -- charAt, compareTo, equals, and length -- are
"inlined" by the VM, and are not going to get much faster.

There are probably a few others that could benefit from this
treatment, but I'm guessing that most string-centric processing in
Java will likely be dominated by the cost of String allocations. (The
above weren't inlined because of a measured performance need -- the
inlining was an experiment that needed a test subject.)

At any rate, converting to JNI is likely counter-productive. It's
more expensive to invoke a native JNI method than a virtual method,
and the native code has to issue JNI calls to access the various
fields in String. Many common operations on short strings would
actually take longer.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"android-platform" group.
To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-platform+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-platform?hl=en
-~----------~----~----~----~------~----~------~--~---

Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

binder documentation

Is there any documentation for how android binder works, specially for the file /kernel/drivers/android/binder.c This is a very big file to read. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---

Next Message by Date: click to view message preview

"Building For Dream" 1.5

Hi, First of all, my goal is to build my own android 1.5 platform with some modification, and deploy it on HTC Dream phone, as some other people already did. ( http://jf.andblogs.net/ ) So, I searched this group (and others), and it seems that there's no easy way to do that. Is it correct? Then I just tried with the kernel version of 2.6.27 while untouching everything else as in the guild line ( http://source.android.com/documentation/building-for-dream ). It compiled well, but when I flashed out this image to the phone, it's totally unusable. HOME key doesn't work, and WiFi doesn't either. Does anyone know how to get around this? More specifically, if anybody knows how to build and deploy custom image from the android source, I would appreciate it. Thanks, Sunghwan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---

Previous Message by Thread: click to view message preview

java.lang.String class in Dalvik

Hi everybody, As I found that at the current, the methods of java.lang.String class of Dalvik are mostly implemented by Java code and maybe it makes the performance reduce. So my thinking is that can we move the implementation to JNI to improve performance? If anybody has experience about that could you share with me about the implementation, the complicate part of it...? Thank you, BR, Mercury --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---

Next Message by Thread: click to view message preview

JNI in Dalvik

Dear everybody, Could you show me any documents about JNI in Dalvik like how to implement a JNI function from Java, the variable type in JNI... Thank you Mercury --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-platform" group. To post to this group, send email to android-platform@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to android-platform+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/android-platform?hl=en -~----------~----~----~----~------~----~------~--~---
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by