Open Joohansson opened 4 years ago
Testing this tool https://github.com/vitorcremonez/nano-vanity I have now verified that running nanocurrency@1.7.4 with await nanocurrency.init() indeed result in 10,000 keys/s per thread compared to 300/s per thread with nanocurrency@2.3.0 which has no init() function. Easy to test by doing npm install and jumping between the two versions. So something has changed with this library. I hope it can be solved somehow.
Also tested with my own multithreading script and getting 70-120k per sec using 12 threads, with 1.7.4.
Ok, looks like the issue has been tracked down. https://github.com/marvinroger/nanocurrency-js/issues/24
You never did the high performance deriveAddressFromSeed function, right? I'm currently in need of high performance key derivation when multi-creating wallets, mass extracting keys/addresses from one seed, searching for a particular address in a seed and vanity address searches. Currently solved by using both the 1.7.4 and 2.3.0 in parallel.
I would also like the function! @marvinroger
I'm currently working on it, I'll add new optimized WASM functions
I'm building a reactJS app for finding vanity addresses using this library and web workers to get multithreading. It all works great and the following code does the address creation and matching. However I have problem with performance. Without the derivePublicKey below I can do 150,000 loops per second. With the derivePublicKey the performance drops to 600/s. Another strange thing is that there is no difference using 2 threads or 12 when doing that. Just using "currentAddressesCount += 1" boost the loop count to 120 million per second so nothing wrong with the multithreading implementation. Perhaps there is nothing wrong with your library but maybe you know what's wrong?