jeudi 1 septembre 2016

Unexpectedly slow number crunching

I've got a sub in my comms service module that constructs packets for sending via Asynchstreams.
I calculate a checksum for the data portion like this:

Code:
  Log("preparing checksum")
Do While cnt < sz-1
oChk(
0) = Bit.Xor(oChk(0),oData(cnt))
cnt = cnt +
1
Loop
Log("checksum done")
I'm finding in some cases that this portion of code can take up to 20 seconds to run with a packet size of 4000 bytes. Why so slow, and is there any way I can...

Unexpectedly slow number crunching

from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/2bVM0q6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire