Created
September 25, 2013 02:13
Revisions
-
emboss created this gist
Sep 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,78 @@ The new Krypt::Asn1 implementation, written entirely in Ruby vs. OpenSSL::ASN1/OpenSSL::X509, both written in native C/Java code. $ ruby --version ruby 2.1.0dev (2013-09-25 trunk 43039) [x86_64-linux] $ ruby -Ilib tmp/bm_asn1_parse.rb Krypt::Asn1.decode String(n=1000) 0.015614 Krypt::Asn1.decode File IO(n=1000) 0.029926 Krypt::Asn1.decode StringIO(n=1000) 0.013826 OpenSSL::ASN1.decode String(n=1000) 0.046950 OpenSSL::X509::Certificate String(n=1000) 0.027505 Krypt::Asn1.decode String(n=10000) 0.149267 Krypt::Asn1.decode File IO(n=10000) 0.252312 Krypt::Asn1.decode StringIO(n=10000) 0.132711 OpenSSL::ASN1.decode String(n=10000) 0.477411 OpenSSL::X509::Certificate String(n=10000) 0.335346 Krypt::Asn1.decode String(n=100000) 1.418942 Krypt::Asn1.decode File IO(n=100000) 2.527537 Krypt::Asn1.decode StringIO(n=100000) 1.353945 OpenSSL::ASN1.decode String(n=100000) 4.948085 OpenSSL::X509::Certificate String(n=100000) 3.466104 $ jruby --version jruby 1.7.5.dev (1.9.3p392) 2013-09-25 4d17ecc on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [linux-amd64] $ jruby -Ilib tmp/bm_asn1_parse.rb Krypt::Asn1.decode String(n=1000) 0.396000 Krypt::Asn1.decode File IO(n=1000) 0.508000 Krypt::Asn1.decode StringIO(n=1000) 0.188000 OpenSSL::ASN1.decode String(n=1000) 0.987000 OpenSSL::X509::Certificate String(n=1000) 0.683000 Krypt::Asn1.decode String(n=10000) 0.879000 Krypt::Asn1.decode File IO(n=10000) 1.566000 Krypt::Asn1.decode StringIO(n=10000) 0.205000 OpenSSL::ASN1.decode String(n=10000) 1.060000 OpenSSL::X509::Certificate String(n=10000) 1.673000 Krypt::Asn1.decode String(n=100000) 0.903000 Krypt::Asn1.decode File IO(n=100000) 3.509000 Krypt::Asn1.decode StringIO(n=100000) 0.896000 OpenSSL::ASN1.decode String(n=100000) 7.920000 OpenSSL::X509::Certificate String(n=100000) 8.247000 $ rbx --version rubinius 2.1.0.n268 (2.1.0 d6924248 2013-09-25 JI) [x86_64-linux-gnu] $ rbx -Ilib tmp/bm_asn1_parse.rb Krypt::Asn1.decode String(n=1000) 0.068043 Krypt::Asn1.decode File IO(n=1000) 0.195864 Krypt::Asn1.decode StringIO(n=1000) 0.052994 OpenSSL::ASN1.decode String(n=1000) 0.171511 OpenSSL::X509::Certificate String(n=1000) 0.081969 Krypt::Asn1.decode String(n=10000) 0.431256 Krypt::Asn1.decode File IO(n=10000) 1.510816 Krypt::Asn1.decode StringIO(n=10000) 0.334855 OpenSSL::ASN1.decode String(n=10000) 1.625399 OpenSSL::X509::Certificate String(n=10000) 0.829793 Krypt::Asn1.decode String(n=100000) 2.807615 Krypt::Asn1.decode File IO(n=100000) 10.508894 Krypt::Asn1.decode StringIO(n=100000) 2.535868 OpenSSL::ASN1.decode String(n=100000) 16.184046 OpenSSL::X509::Certificate String(n=100000) 10.918114 Check https://github.com/krypt for updates.