HTTP::...s::Fast(3pm)
πΈ NAME πΈ
hey bestie π welcome to the HTTP::...s::Fast(3pm) page β yes, User Contributed Perl Documentation, we're in it. the main character is HTTP::Headers::Fast, and it's a faster implementation of HTTP::Headers π
β¨ SYNOPSIS β¨
okay so the whole synopsis is literally this:
use HTTP::Headers::Fast;
# and, same as HTTP::Headers.
π DESCRIPTION π
HTTP::Headers::Fast is a perl class for parsing/writing HTTP headers. The interface is same as HTTP::Headers β cute, consistent, no cap β¨
π¦ WHY YET ANOTHER ONE? π¦
so why yet another one? HTTP::Headers is a very good. But I needed a faster implementation, fast =)
π ADDITIONAL METHODS π
these are the extra methods, and yes they are iconic π
as_string_without_sort
as_string sorts the header names. But sorting is a bit slow.
This method stringifies the instance of HTTP::Headers::Fast without sorting.
psgi_flatten
returns a PSGI compatible arrayref of header.
the original snippet goes like this:
my $headers:ArrayRef = $header->flatten
psgi_flatten_without_sort
same as flatten but returns an arrayref without sorting.
π₯ @ISA HACK π₯
If you want HTTP::Headers::Fast to pretend like it's really HTTP::Headers, you can try the following hack:
unshift @HTTP::Headers::Fast::ISA, 'HTTP::Headers';
π BENCHMARK π
okay benchmark time, the stats are HTTP::Headers 5.818, HTTP::Headers::Fast 0.01, and I'm keeping every number exactly as given, no cap:
HTTP::Headers 5.818, HTTP::Headers::Fast 0.01
-- push_header
Rate orig fast
orig 144928/s -- -20%
fast 181818/s 25% --
-- push_header_many
Rate orig fast
orig 74627/s -- -16%
fast 89286/s 20% --
-- get_date
Rate orig fast
orig 34884/s -- -14%
fast 40541/s 16% --
-- set_date
Rate orig fast
orig 21505/s -- -19%
fast 26525/s 23% --
-- scan
Rate orig fast
orig 57471/s -- -1%
fast 57803/s 1% --
-- get_header
Rate orig fast
orig 120337/s -- -24%
fast 157729/s 31% --
-- set_header
Rate orig fast
orig 79745/s -- -30%
fast 113766/s 43% --
-- get_content_length
Rate orig fast
orig 182482/s -- -77%
fast 793651/s 335% --
-- as_string
Rate orig fast
orig 23753/s -- -41%
fast 40161/s 69% --
π AUTHOR π
the author list is giving credits, and we stan:
Tokuhiro Matsuno E<lt>tokuhirom@gmail.comE<gt>Daisuke Maki
And HTTP::Headers' originally written by Gisle Aas.
π«Ά THANKS TO π«Ά
MarkstosTatsuhiko Miyagawa
π SEE ALSO π
HTTP::Headers
β LICENSE β
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page, mwah π β this was perl v5.42.0, dated 2019-04-16, from HTTP::...s::Fast(3pm). bye bestie, go parse some headers π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-HTTP-Headers-Fast 0.22-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms