bitdefender / bddisasm

bddisasm is a fast, lightweight, x86/x64 instruction decoder. The project also features a fast, basic, x86/x64 instruction emulator, designed specifically to detect shellcode-like behavior.
Apache License 2.0
888 stars 115 forks source link

More optimizations #101

Open turol opened 2 months ago

turol commented 2 months ago

GCC was putting a conditional move in the copy loop for some reason. The second one is less certain and seems to be highly sensitive to changes.

    N           Min           Max        Median           Avg        Stddev
x  30      18039044      18336971      18278984      18267936     61730.367
+  30      18453057      18728267      18672697      18658935     56689.819
Difference at 95.0% confidence
    390999 +/- 30634.3
    2.14036% +/- 0.167694%
    (Student's t, pooled s = 59263.7)
Instructions/second, higher is better
vlutas commented 2 months ago

On Windows (MSVC compiler), the performance with these changes is essentially the same.

turol commented 2 months ago

Does your CI pipeline upload the MSVC -built binaries somewhere?