[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-03-10 Thread Dong-hee Na


Change by Dong-hee Na :


--
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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-03-10 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 9a9c11ad41d7887f3d6440e0f0e8966156d959b5 by Dong-hee Na in branch 
'master':
bpo-43287: Use PEP 590 vectorcall to speed up filter() (GH-24611)
https://github.com/python/cpython/commit/9a9c11ad41d7887f3d6440e0f0e8966156d959b5


--

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-03-09 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43447: "Generate vectorcall code to parse arguments using Argument 
Clinic".

--

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, I don't think there is much of a maintenance burden; hence, the +0.  
You've already done the work.

--

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Happy new year to you as well :-)

--

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

> +0 I don't see any downside.

Thank you Raymond :)
I agree with your view, At first, I thought that instantiation time reducing is 
also meaningful and we already applied PEP 590 for some of the types to reduce 
instantiation. (e.g range(), list(), dict(), bool(), reversed(), type()..)

And also I thought that filter is one of the well-used features in Python so it 
was one of the candidates to apply from my sight. ;)

But if this PR only consume maintenance cost, I am okay with not to apply it 
doesn't matter :)

And happy new year Raymond(Sorry I am late ;) But the lunar new year was only 
2weeks ago so not too late lol)

--

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+0 I don't see any downside.

Note, the benchmark only times instantiation of the filter object.  It doesn't 
actually run the iterator which is where most of the runtime cost is spent.  So 
in actual code there is almost zero benefit.  For example, add "list" to the 
statement:   stmt="b = list(filter(lambda x: x % 2 == 0, a))" and the 
improvement disappears.

--
nosy: +rhettinger

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


New submission from Dong-hee Na :

+--++--+
| Benchmark| master | vectorcall   |
+==++==+
| bench filter | 191 ns | 151 ns: 1.26x faster |
+--++--+

Like reversed(https://bugs.python.org/issue41922), it looks okay to update 
filter() to use PEP 590.

--
components: Interpreter Core
files: filter_bench.py
messages: 387469
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: Use PEP 590 vectorcall to speed up calls to filter()
versions: Python 3.10
Added file: https://bugs.python.org/file49825/filter_bench.py

___
Python tracker 

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