PHP hash_pbkdf2 takes orders of magnitude longer on AWS instances
问题 We wanted to benchmark the hash_pbkdf2 function in PHP to select an appropriate number of iterations for our application to use. When I ran my benchmark script on an m4.large AWS instance, it took five orders of magnitude longer to run than it does on my laptop. This Gist shows the script I am using, and the results I get from an m4.large instance (under load), a t2.micro instance (with full CPU credits and no load) and three different speed Intel i7 laptops. https://gist.github.com/roberthl