A
A
androd2016-01-27 21:33:14
Android
androd, 2016-01-27 21:33:14

Fastest XOR in Android?

Good evening.
What's the fastest way you know to XOR a large amount of data in memory, either as a blob or an array?
Thanks for the answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2016-01-28
@androd

Pad the arrays up to a multiplicity of 4. Represent them as int arrays. Almost all mobile processors are 32-bit, so an int fits entirely in a register. And xorit ints. It is possible in several threads, by assigning a piece of data to each thread.
Another way is opencl. There are bindings for java and implementations for android.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question