Closed
Description
OpenSSL::PKCS5.pbkdf2_hmac_sha1 is about 10x slower than Ruby 1.9's version:
# On Ruby 1.9.3:
[4] pry(main)> Benchmark.bmbm { |x|
x.report {
OpenSSL::PKCS5.pbkdf2_hmac_sha1("Foo", "Bar", 2000, 1024)
}
}
Rehearsal ------------------------------------
0.140000 0.000000 0.140000 ( 0.133370)
--------------------------- total: 0.140000sec
user system total real
0.130000 0.000000 0.130000 ( 0.130077)
# On JRuby 1.7.4:
[4] pry(main)> Benchmark.bmbm { |x|
x.report {
OpenSSL::PKCS5.pbkdf2_hmac_sha1("Foo", "Bar", 2000, 1024)
}
}
Rehearsal ------------------------------------
2.200000 0.000000 2.200000 ( 1.922000)
--------------------------- total: 2.200000sec
user system total real
2.040000 0.000000 2.040000 ( 1.837000)