And according to my tests pure VanitySearch code base for CPU is two times faster than used through python.
Will try it out later but my guess is that VanitySearch performance for CPU can be optimized even further by placing most used functions local scope vars to global.
#include "secp256k1/SECP256k1.h"
#include "secp256k1/Int.h"
#include <iostream>
#include <fstream>
int main() {
Secp256K1* secp256k1 = new Secp256K1();
secp256k1->Init();
Int privKey;
privKey.SetBase10("1");
Point pub;
std::string bitAddr;
std::ofstream outFile;
outFile.open("address.txt", std::ios::app);
for(int i = 0; i < 1000000; i++) {
pub = secp256k1->ComputePublicKey(&privKey);
bitAddr = secp256k1->GetAddress(0, false, pub);
outFile << bitAddr << '\n';
privKey.AddOne();
}
outFile.close();
return 0;
}
real 0m9.805s
user 0m9.784s
sys 0m0.020s