Re: SISC on Android and the Heap

Toni <[email protected]> Wed, 10 Mar 2010 20:42:51 +0100
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Hi all,

And what's the value of data.length? Maybe that filePointer is too big, 
and for some reason accessing data[filePointer++] is too expensive (I'm 
thinking of paging in a memory-constrained device, or something).

The rest of operations (integer? comparison and binary and) should be 
pretty fast, I imagine.

Cheers,
Antonio

On 10/03/10 05:05, Nikita Sidorov wrote:
> Hi Chad,
>
> 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.
>
> Are you sure it's not the profiler or the simulator that make thing so slow? Have you tried to run it on a real device? Or at least in the simulator but without profiler enabled?
>
> Nikita
>

------------------------------------------------------------------------------
Download Intel&#174; 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