Profile of MIME/Base64.pm

← Index
NYTProf Performance Profile «line view»
For t/bug-md-11.t
Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:23 2024

Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/x86_64-linux/MIME/Base64.pm
Statements | Executed 14 statements in 277µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 8µs | 10µs | MIME::Base64::::BEGIN@3MIME::Base64::BEGIN@3
1 | 1 | 1 | 3µs | 19µs | MIME::Base64::::BEGIN@4MIME::Base64::BEGIN@4
0 | 0 | 0 | 0s | 0s | MIME::Base64::::decode_base64urlMIME::Base64::decode_base64url
0 | 0 | 0 | 0s | 0s | MIME::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
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package MIME::Base64;
2 |  |  |  |  |
3 | 2 | 16µs | 2 | 11µs | # spent 10µs (8+2) within MIME::Base64::BEGIN@3 which was called: # once (8µs+2µs) by Spreadsheet::ParseXLSX::Decryptor::BEGIN@15 at line 3 use strict; # spent 10µs making 1 call to MIME::Base64::BEGIN@3 # spent 2µs making 1 call to strict::import
4 | 2 | 136µs | 2 | 34µs | # spent 19µs (3+16) within MIME::Base64::BEGIN@4 which was called: # once (3µs+16µs) by Spreadsheet::ParseXLSX::Decryptor::BEGIN@15 at line 4 use warnings; # spent 19µs making 1 call to MIME::Base64::BEGIN@4 # spent 16µs making 1 call to warnings::import
5 |  |  |  |  |
6 | 1 | 400ns |  |  | require Exporter;
7 | 1 | 7µs |  |  | our @ISA = qw(Exporter);
8 | 1 | 400ns |  |  | our @EXPORT = qw(encode_base64 decode_base64);
9 | 1 | 400ns |  |  | our @EXPORT_OK = qw(encode_base64url decode_base64url encoded_base64_length decoded_base64_length);
10 |  |  |  |  |
11 | 1 | 200ns |  |  | our $VERSION = '3.16_01';
12 |  |  |  |  |
13 | 1 | 200ns |  |  | require XSLoader;
14 | 1 | 109µs | 1 | 104µs | XSLoader::load('MIME::Base64', $VERSION); # spent 104µs making 1 call to XSLoader::load
15 |  |  |  |  |
16 | 1 | 900ns |  |  | *encode = \&encode_base64;
17 | 1 | 100ns |  |  | *decode = \&decode_base64;
18 |  |  |  |  |
19 |  |  |  |  | sub encode_base64url {
20 |  |  |  |  | my $e = encode_base64(shift, "");
21 |  |  |  |  | $e =~ s/=+\z//;
22 |  |  |  |  | $e =~ tr[+/][-_];
23 |  |  |  |  | return $e;
24 |  |  |  |  | }
25 |  |  |  |  |
26 |  |  |  |  | sub decode_base64url {
27 |  |  |  |  | my $s = shift;
28 |  |  |  |  | $s =~ tr[-_][+/];
29 |  |  |  |  | $s .= '=' while length($s) % 4;
30 |  |  |  |  | return decode_base64($s);
31 |  |  |  |  | }
32 |  |  |  |  |
33 | 1 | 5µs |  |  | 1;
34 |  |  |  |  |
35 |  |  |  |  | __END__