1HTTP::Headers::Fast(3pmU)ser Contributed Perl DocumentatiHoTnTP::Headers::Fast(3pm)
2
3
4

NAME

6       HTTP::Headers::Fast - faster implementation of HTTP::Headers
7

SYNOPSIS

9         use HTTP::Headers::Fast;
10         # and, same as HTTP::Headers.
11

DESCRIPTION

13       HTTP::Headers::Fast is a perl class for parsing/writing HTTP headers.
14
15       The interface is same as HTTP::Headers.
16

WHY YET ANOTHER ONE?

18       HTTP::Headers is a very good. But I needed a faster implementation,
19       fast  =)
20

ADDITIONAL METHODS

22       as_string_without_sort
23           as_string method sorts the header names.But, sorting is bit slow.
24
25           In this method, stringify the instance of HTTP::Headers::Fast
26           without sorting.
27
28       psgi_flatten
29           returns PSGI compatible arrayref of header.
30
31               my $headers:ArrayRef = $header->flatten
32
33       psgi_flatten_without_sort
34           same as flatten but returns arrayref without sorting.
35

@ISA HACK

37       If you want HTTP::Headers::Fast to pretend like it's really
38       HTTP::Headers, you can try the following hack:
39
40           unshift @HTTP::Headers::Fast::ISA, 'HTTP::Headers';
41

BENCHMARK

43           HTTP::Headers 5.818, HTTP::Headers::Fast 0.01
44
45           -- push_header
46                   Rate orig fast
47           orig 144928/s   -- -20%
48           fast 181818/s  25%   --
49
50           -- push_header_many
51                   Rate orig fast
52           orig 74627/s   -- -16%
53           fast 89286/s  20%   --
54
55           -- get_date
56                   Rate orig fast
57           orig 34884/s   -- -14%
58           fast 40541/s  16%   --
59
60           -- set_date
61                   Rate orig fast
62           orig 21505/s   -- -19%
63           fast 26525/s  23%   --
64
65           -- scan
66                   Rate orig fast
67           orig 57471/s   --  -1%
68           fast 57803/s   1%   --
69
70           -- get_header
71                   Rate orig fast
72           orig 120337/s   -- -24%
73           fast 157729/s  31%   --
74
75           -- set_header
76                   Rate orig fast
77           orig  79745/s   -- -30%
78           fast 113766/s  43%   --
79
80           -- get_content_length
81                   Rate orig fast
82           orig 182482/s   -- -77%
83           fast 793651/s 335%   --
84
85           -- as_string
86                   Rate orig fast
87           orig 23753/s   -- -41%
88           fast 40161/s  69%   --
89

AUTHOR

91           Tokuhiro Matsuno E<lt>tokuhirom@gmail.comE<gt>
92           Daisuke Maki
93
94       And HTTP::Headers' originally written by Gisle Aas.
95

THANKS TO

97       Markstos
98
99       Tatsuhiko Miyagawa
100

SEE ALSO

102       HTTP::Headers
103

LICENSE

105       This library is free software; you can redistribute it and/or modify it
106       under the same terms as Perl itself.
107
108
109
110perl v5.32.1                      2021-01-27          HTTP::Headers::Fast(3pm)
Impressum