Re: SISC on Android and the Heap
Toni <[email protected]> Wed, 10 Mar 2010 21:36:25 +0100
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
And
http://d.android.com/guide/practices/design/performance.html#cache_fields
Quoting:
"Accessing object fields is much slower than accessing local variables"
So what about caching that "data.length" somewhere? If that method is
invoked 35k times then maybe it's worth the effort...
Cheers,
Antonio
On 10/03/10 20:55, Ben Goetter wrote:
> You might be surprised at what's slow on Android. Here you're seeing
> the overhead of myriad calls through an interface. Qv
> http://d.android.com/guide/practices/design/performance.html#prefer_virtual
>
> Also,
> http://d.android.com/guide/practices/design/performance.html#object_creation
> is really hurting us.
>
> On 3/10/2010 11:42 AM, Toni wrote:
>> On 10/03/10 05:05, Nikita Sidorov wrote:
>>
>>> Your profiler data suggest that it takes 0.223 millisecond per call of MemoryRandomAccessInputStream.read(). But the method is really simple:
>>>
>>> public int read() throws IOException {
>>> if (filePointer==data.length) return -1;
>>> return data[filePointer++]& 0xff;
>>> }
>>>
>>> Being called 35K+ times results in 7 seconds spent just calling this method.
>>>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Sisc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sisc-users
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev