> Note that the libc version is doing a lot of 64bit divides and a > system call for every number.... > > The 'fast modular exponentiation' routine isn't particularly fast! > That function can easily be written without a single divide (for the > values of 'mod' in that routine). send code. itojun