jeudi 23 mars 2017

Actionscript, improving xor performance?

I am using the below code to process some large files.

var joinedBytes:ByteArray = new ByteArray;
joinedBytes.length = _chunkSize;

for (var i:Number = 0; i < _chunkSize; i++) {
    joinedBytes.writeByte(_xorBytesBuffer[i]^_rndBytesBuffer[i]);
}

Its taking about 2.5 seconds to process 10mb of data on a desktop.

Is this normal performance?

Does any way exist to speed it up?

I think that some of the time is writing to the byte array.

Aucun commentaire:

Enregistrer un commentaire