Cookie...ker::XS(3pm)
πΈ NAME πΈ
okay so bestie, this is the Cookie::Baker::XS page from the User Contributed Perl Documentation (yes, a 3pm manual, we're fancy). And what does it do?? It boosts Cookie::Baker's crush_cookie. that's literally it. it's giving speed. π
β¨ SYNOPSIS β¨
the vibe is very simple, no notes:
use Cookie::Baker::XS qw/crush_cookie/;
my $cookies_hashref = crush_cookie($headers->header('Cookie'));
likeβ¦ that's the whole thing. use it, crush a cookie, get a hashref. periodt. π
π DESCRIPTION π
so Cookie::Baker::XS hands you a cookie string parser β and the β¨sparkleβ¨ is that it's implemented by XS. you know, the C-under-the-hood situation, so it's fast fast. π₯
ngl this module is a parser and only a parser. it does not have a generator function. so if you're looking for "make me a cookie string" energyβ¦ not here, bestie, sorry. π
for more details, see Cookie::Baker's document. that's where the full lore lives. π
π BENCHMARK π
here's the receipts, bestie. numbers don't lie and neither does this module. π§
## length($cookie) == 675
Benchmark: running pp, xs for at least 1 CPU seconds...
pp: 1 wallclock secs ( 1.08 usr + 0.00 sys = 1.08 CPU) @ 16592.59/s (n=17920)
xs: 1 wallclock secs ( 1.05 usr + 0.00 sys = 1.05 CPU) @ 182043.81/s (n=191146)
Rate pp xs
pp 16593/s -- -91%
xs 182044/s 997% --
not me staring at that 997% π the XS version ate and left no crumbs.
and for the little cookies too:
## length($cookie) == 17
Benchmark: running pp, xs for at least 1 CPU seconds...
pp: 2 wallclock secs ( 1.05 usr + 0.01 sys = 1.06 CPU) @ 201749.06/s (n=213854)
xs: 0 wallclock secs ( 1.19 usr + 0.01 sys = 1.20 CPU) @ 1042617.50/s (n=1251141)
Rate pp xs
pp 201749/s -- -81%
xs 1042618/s 417% --
417% faster on the tiny cookies, highkey iconic. π
π¦ SEE ALSO π¦
Cookie::Bakerβ the og, the blueprint, the main character. go read it. iykyk. π
π LICENSE π
Copyright (C) Masahiro Nagano.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
so yes bestie, it's free, it's open, it's slaying responsibly. π
β AUTHOR β
Masahiro Nagano <kazeburo@gmail.com>
and that's the whole page!! π πβ¨
this beautiful thing came to you via perl v5.42.3, dated 2026-08-19, straight out of the Cookie...ker::XS(3pm) manual β go forth and crush those cookies, bestie π«ΆπΈ
π¦ where this page comes from
- ubuntu stonking: libcookie-baker-xs-perl 0.12-1build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms