summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-08 11:00:47 (GMT)
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-08 11:00:47 (GMT)
commit0a22f4c168d197734a79a34c36b837d6e117e7e7 (patch)
treee7a0ffda03cc2bd69973ca3e0bbf73a0ad1f0a1b /benchmark
parentd6f0bd2b8423807755bae05a388625a8ef6e7e04 (diff)
* lib/securerandom.rb: use OpenSSL::BN for performance improvement.
* benchmark/bm_securerandom.rb: benchmark script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_securerandom.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/benchmark/bm_securerandom.rb b/benchmark/bm_securerandom.rb
new file mode 100644
index 0000000..a082ea6
--- /dev/null
+++ b/benchmark/bm_securerandom.rb
@@ -0,0 +1,5 @@
+require "securerandom"
+
+20_0000.times do
+ SecureRandom.random_number(100)
+end