|
.NET JIT is quite good, doing things unsafe is closer to C but there will only be some relatively small increase if you make the VB.NET code highly efficient. XORarrayValues should write directly into one if the two input arguments (and ^= mutable variant used, not x=x^y) or pass a third output buffer and reuse it. Also consider running the VS profiler to see line by line where most time is spent. If you still aren't happy after these basic steps, you can consider whether to spend the time rewriting in C.
Are you sure this isn't just CBC DES and directly decryptable extremely fast with Windows builtin libraries via .NETs System.Security.Cryptography? Ah nevermind, seems there is no way to inject the XORs between blocks. ECB mode and doing manually seems fine.
Last edited by chants; 03-12-2024 at 07:30.
|