Post
Topic
Board Development & Technical Discussion
Re: Question about Wt in the SHA-256 algorithm
by
J-N
on 16/03/2018, 01:32:20 UTC
Compiled C++ results in machine code binaries.  Most C++ compilers have been optimized, so if the code is well written then it should run just about as fast as it would if it was written in assembler.

Well C# results in almost the same assembly code as using C++ in windows I am told and I even tried speeding things
up using un-safe pointer code but that didn't achieve much of a result so maybe hidden within the COM windows is still using
after they told everyone to move over to Dot.Net they kick out to some custom hand crafted machine code.
You can use inline assembly code in C++ program, for example:
Code:
#include

int main() {
    /* moves the byte from ch to the memory pointed by ebx */
    __asm__("movb %ch, (%ebx)");

    return 0 ;
}

So SHA256 can be implemented directly in ASM code and the computing will be fast as possible on the CPU.