Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to efficiently store bitsets on Android
    primarykey
    data
    text
    <p>My application requires me to store sets of bits along with some accompanying metadata on the Android platform (read only for now). Now obviously I could just implement the Serializable interface, but I hear it's very slow on Android (I can imagine has to do something with the custom VM and compiler that makes such reflective features inefficient). Should I:</p> <ol> <li>Use Android's Parcel system which seems to be an "assisted" marshalling technique.</li> <li>Use a custom binary format (maybe BMP style with the header information stripped).</li> <li>Store into an XML file manually, use XML parser to retrieve data.</li> </ol> <p>Now from what I understand XML serialization or parcelization isn't really backwards compatible on Android? The appeal of XML is of course that these persistent files could be edited in a regular text editor. Which leaves me in a difficult position, since I hate writing code that is redundant. </p> <p>At this point I am heavily leaning towards the first option (i.e. bitset being parcelized). Any experienced Java/Android programmers care to tell me how well I can expect this to perform? Would I have to expand the bitset into an array of booleans to get acceptable runtime performance? Of course the problem with this is that even a rudimentary benchmark would have to be run on the Dalvik VM since I can't expect Sun's VM on x86 have similar performance to Android on ARM. How does the Android emulator work? Is it a VM on top of the x86 host or does it emulate the ARM instruction set and run the VM targeted at ARM?</p> <p>I hope this ADD post didn't confuse everyone because it confused me. :D</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload