Android Question Fastest File Compare

Richard Peck

Member
Licensed User
Longtime User
Hi All

Can anyone tell me the fastest way to condense of 2 files. I've tried the normal file access and I've tried the RandomAccessFile library with 8 byte access but both a really slow. Any know a faster way ?

Thanks
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
If you are compiling with rapid - debug its going to be slow. try it compiled to release mode to see the real speed.
 
Upvote 0

Richard Peck

Member
Licensed User
Longtime User
Hi,

I have compiled it as a release but it's still very slow. Is the a faster way to do a file compare then the ways I mentioned ? Is there any other libraries I can try. Any other thought would be helpful.

Thanks
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
How did you the compare? are you comparing each single byte? I would try to read 8k or 16k (or more) in a string and then a string-compare of these 8/16kb each...

Maybe post your code (export as zip) and we have a look
 
Upvote 0

Richard Peck

Member
Licensed User
Longtime User
How did you the compare? are you comparing each single byte? I would try to read 8k or 16k (or more) in a string and then a string-compare of these 8/16kb each...

Maybe post your code (export as zip) and we have a look
Right now I'm doing 8 byte compares. I'm not sure how you would do a 16k compare, can you give a shore example ?

Thanks
 
Upvote 0
Top