|
Meta tags:
description=Replace hand-written picklebuf_new with Argument Clinic + vectorcall.
Extra positional arguments now raise TypeError: PickleBuffer expected 1 argument, got N instead of TypeError: PickleBuffer() takes at most 1 argument (N given). Keyword arguments now raise TypeError: PickleBuffer() takes no keyword arguments instead of TypeError: PickleBuffer() takes exactly 1 positional argument (0 given).
Benchmark:
+--------------------------------+--------+------------------------+
Benchmark main patch
+================================+========+========================+
PickleBuffer(b) 187 ns 112 ns: 1.67x faster
pickle.PickleBuffer(b) 205 ns 124 ns: 1.66x faster
+--------------------------------+--------+------------------------+
Geometric mean (ref) 1.66x faster
+--------------------------------+--------+------------------------+
Details
import pyperf
SETUP =
import pickle
b = b abc
PickleBuffer = pickle.PickleBuffer
CASES = [
( PickleBuffer(b) , PickleBuffer(b) ),
( pickle.PickleBuffer(b) , pickle.PickleBuffer(b) )
]
runner = pyperf.Runner()
for name, stmt in CASES:
runner.timeit(name, stmt=stmt, setup=SETUP)
Issue: gh-162350;
Headings (most frequently used words):
uh, oh, for, nov, 22, 2026, choose, reason, hiding, this, comment, navigation, gh, 162350, add, ac, vectorcall, pickle, picklebuffer, 162448, footer, eendebakpt, cmaloney, diff, view, menu, repository, there, are, no, files, selected, viewing, filter, by, extension, tanloong,
Text of the page (most frequently used words):
this (34), comment (21), the (19), for (18), github (17), code (17), file (16), there (16), and (16), #reason (15), all (14), was (14), reload (14), clinic (13), while (12), loading (12), applied (11), please (10), choose (10), hiding (10), copy (10), error (9), page (9), learn (9), 2026 (8), add (8), hide (8), quality (8), more (8), pickle (8), picklebuffer (8), you (7), suggestion (7), cannot (7), suggestions (7), changes (7), something (7), went (7), wrong (7), nov (7), generated (7), pyobject (7), picklebufobject (7), sign (7), that (6), line (6), resolved (6), outdated (6), expand (6), reactions (6), will (6), vectorcall (6), pypicklebufferobject (6), type (6), input (6), show (6), files (6), can (5), security (5), commit (5), sorry (5), low (5), duplicate (5), off (5), topic (5), abuse (5), spam (5), displayed (5), describe (5), others (5), problem (5), contributor (5), markdown (5), link (5), tanloong (5), view (5), diff (5), objects (5), your (5), not (4), pull (4), comments (4), retry (4), with (4), cmaloney (4), 162350 (4), null (4), self (4), base (4), open (4), about (4), support (4), copilot (4), community (3), navigation (3), request (3), from (3), batch (3), down (3), free (3), are (3), picklebuf_new (3), pytypeobject (3), return (3), end (3), output (3), start (3), include (3), hidden (3), characters (3), unicode (3), load (3), whitespace (3), filter (3), commits (3), 162448 (3), merged (3), python (3), account (3), another (3), tab (3), window (3), refresh (3), session (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), contact (2), status (2), privacy (2), terms (2), footer (2), change (2), single (2), only (2), one (2), viewing (2), toggle (2), oops (2), benchmarks (2), good (2), eendebakpt (2), enhancement (2), why (2), pypicklebuffer_type (2), tp_alloc (2), static (2), object (2), keywords (2), kwds (2), args (2), original (2), da39a3ee5e6b4b0d (2), number (2), bidirectional (2), what (2), review (2), desktop (2), delete (2), edit (2), additions (2), deletions (2), selected (2), apply (2), split (2), unified (2), failed (2), jump (2), nbsp (2), extension (2), tree (2), issue (2), insights (2), projects (2), actions (2), repository (2), cpython (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), business (2), fixes (2), products (2), secret (2), perform, action, time, share, personal, information, manage, cookies, docs, inc, right, now, check, back, later, queued, merge, multi, pending, reviews, has, been, marked, must, existing, order, create, valid, applying, deleted, lines, supported, per, subset, closed, invalid, because, were, made, annotations, notes, picklebuf_clear, tp_clear, picklebuf_traverse, tp_traverse, picklebuf_dealloc, tp_dealloc, local, prototyping, found, overall, pickles, got, measurably, faster, small, cases, run, validate, reacted, thumbs, emoji, entirely, adds, binary, but, improve, fine, look, makes, measurable, difference, listed, speedup, candidate, benchmark, above, shows, cost, get, benefit, bit, refactor, think, author, vector, used, performance, critical, thread, picklebuf_vectorcall, tp_vectorcall, tp_new, py_tpflags_have_gc, py_tpflags_default, tp_flags, sizeof, tp_basicsize, 215, 228, b8269110aace6998, 0f1cdf375a70e71d, picklebuf_new_impl, pyarg_parsetupleandkeywords, __new__, classmethod, char, pypicklebuffer_release, obj, exported, pyobject_head, struct, typedef, b334ecd891c9cbc2, class, 6165c351cde067ba, module, stddef, ft_clear_weakrefs, pycore_weakref, contains, text, may, interpreted, compiled, differently, than, appears, below, editor, reveals, some, rendered, default, how, customized, appear, conversations, clear, filters, viewed, types, a9d99da, select, changed, checks, conversation, into, picklebuffer_vectorcall, main, already, clicking, agree, our, occasionally, send, related, emails, statement, service, its, maintainers, have, question, project, new, items, requests, issues, message, dismiss, alert, switched, accounts, out, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, development, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
|