Skip to content

Conversation

@dg-pb
Copy link
Contributor

@dg-pbdg-pb commented Oct 9, 2024

Slight initialization penalty for vanilla case, but slightly faster for subclass optimization.

Bench

S="from functools import partial, Placeholderf = lambda a, b: Nonep = partial(f, a=1)" C0='partial(f, a=1)' C1='partial(p, b=2)'# BEFORE | AFTER$PYEXE -m timeit -s $S$C0# 180 ns | 210 ns$PYEXE -m timeit -s $S$C1# 280 ns | 250 ns

@dg-pb
Copy link
ContributorAuthor

Not planned.

@dg-pbdg-pb closed this Oct 26, 2024
@dg-pbdg-pb deleted the gh-125028-prohibit-kw-placeholders branch October 26, 2024 04:34
@dg-pbdg-pb restored the gh-125028-prohibit-kw-placeholders branch October 27, 2024 00:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dg-pb@ZeroIntensity