← Index
NYTProf Performance Profile   « block view • line view • sub view »
For mentat.storage.mongo.pl
  Run on Tue Jun 24 10:04:38 2014
Reported on Tue Jun 24 10:05:08 2014

Filename/usr/lib/perl/5.14/MIME/Base64.pm
StatementsExecuted 14 statements in 355µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11113µs16µsMIME::Base64::::BEGIN@3MIME::Base64::BEGIN@3
11110µs53µsMIME::Base64::::BEGIN@4MIME::Base64::BEGIN@4
0000s0sMIME::Base64::::decode_base64urlMIME::Base64::decode_base64url
0000s0sMIME::Base64::::encode_base64urlMIME::Base64::encode_base64url
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MIME::Base64;
2
3229µs219µs
# spent 16µs (13+3) within MIME::Base64::BEGIN@3 which was called: # once (13µs+3µs) by MIME::QuotedPrint::BEGIN@12 at line 3
use strict;
# spent 16µs making 1 call to MIME::Base64::BEGIN@3 # spent 3µs making 1 call to strict::import
42166µs296µs
# spent 53µs (10+43) within MIME::Base64::BEGIN@4 which was called: # once (10µs+43µs) by MIME::QuotedPrint::BEGIN@12 at line 4
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
# spent 53µs making 1 call to MIME::Base64::BEGIN@4 # spent 43µs making 1 call to vars::import
5
61700nsrequire Exporter;
715µs@ISA = qw(Exporter);
81700ns@EXPORT = qw(encode_base64 decode_base64);
91700ns@EXPORT_OK = qw(encode_base64url decode_base64url encoded_base64_length decoded_base64_length);
10
111300ns$VERSION = '3.13';
12
131200nsrequire XSLoader;
141142µs1136µsXSLoader::load('MIME::Base64', $VERSION);
# spent 136µs making 1 call to XSLoader::load
15
1611µs*encode = \&encode_base64;
171500ns*decode = \&decode_base64;
18
19sub encode_base64url {
20 my $e = encode_base64(shift, "");
21 $e =~ s/=+\z//;
22 $e =~ tr[+/][-_];
23 return $e;
24}
25
26sub decode_base64url {
27 my $s = shift;
28 $s =~ tr[-_][+/];
29 $s .= '=' while length($s) % 4;
30 return decode_base64($s);
31}
32
3318µs1;
34
35__END__