[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-11 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney


Dennis Sweeney  added the comment:


New changeset 035414a878a772d1d293cdecdc4470bcce5e5d7a by Dennis Sweeney in 
branch 'main':
bpo-44953: Add newline at end of NEWS entry (GH-31265)
https://github.com/python/cpython/commit/035414a878a772d1d293cdecdc4470bcce5e5d7a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
pull_requests: +29431
pull_request: https://github.com/python/cpython/pull/31265

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2022-02-10 Thread Dennis Sweeney


Dennis Sweeney  added the comment:


New changeset 0a145069e807fdafd1fa0315b9bc22da363d2d39 by Dennis Sweeney in 
branch 'main':
bpo-44953: Add vectorcall for itemgetter and attrgetter instances (GH-27828)
https://github.com/python/cpython/commit/0a145069e807fdafd1fa0315b9bc22da363d2d39


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2021-08-19 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
pull_requests: +26293
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27828

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44953] Add vectorcall on operator.itemgetter and attrgetter objects

2021-08-19 Thread Dennis Sweeney


New submission from Dennis Sweeney :

## Below are my benchmarks for this change.

from operator import itemgetter, attrgetter
from pyperf import Runner

class MyClass:
__slots__ = "a", "b"

namespace = {'itemgetter': itemgetter,
 'attrgetter': attrgetter,
 'MyClass': MyClass,
 }

runner = Runner()
runner.timeit(
name="itemgetter",
setup="f = itemgetter(1); x = (1, 2, 3)",
stmt="f(x)",
globals=namespace
)
runner.timeit(
name="attrgetter",
setup="f = attrgetter('b'); x = MyClass(); x.a = x.b = 1",
stmt="f(x)",
globals=namespace
)

# Results #
# itemgetter: Mean +- std dev: [operator_main] 45.3 ns +- 1.3 ns -> 
[operator_vec] 29.5 ns +- 0.7 ns: 1.54x faster
# attrgetter: Mean +- std dev: [operator_main] 61.6 ns +- 1.7 ns -> 
[operator_vec] 43.8 ns +- 0.9 ns: 1.41x faster

--
components: Library (Lib)
messages: 399900
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Add vectorcall on operator.itemgetter and attrgetter objects
type: performance
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com