Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8fd3901773
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (13 sloc) 0.455 kb
require 'krypt'
require_relative 'resources'
require 'stringio'
require 'openssl'
require 'benchmark'
Benchmark.bm do |bm|
cert = Resources.certificate
[1000, 10_000, 100_000].each do |n|
bm.report("Krypt::X509.parse_der String(n=#{n})") { n.times { Krypt::X509::Certificate.parse_der(cert) } }
bm.report("OpenSSL::X509::Certificate String(n=#{n})") { n.times { OpenSSL::X509::Certificate.new(Resources.certificate) } }
puts
end
end
Jump to Line
Something went wrong with that request. Please try again.