-
Notifications
You must be signed in to change notification settings - Fork 576
Description
This is not a bug report, but a suggestion.
Python is slow, and POW computation by definition requires a lot of CPU resource. Therefore, there is a problem that Python implementation "steals" CPU resource. Also it creates a false impression that that much CPU work is required to send a message, when in reality native implementation would require probably few times less CPU. Since POW is important for bitmessage, this is a significant issue.
My suggestion is to write the corresponding POW function in llvm code, and then bind with llvm and compile and run it. llvm has the ability to run in JIT, but this is also not a native way. llvm also has the ability to write native code into binary blob (ELF or other depending in architecture). Maybe this is all that is needed, you can just run a native function from there.
You can actually write POW function in C first, and compile it into llvm language.