[issue13653] reorder set.intersection parameters for better performance

2019-08-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: The anti-correlation algorithm seems like a plausible heuristic but it can't really know more than the user does about the semantic content of the sets. Also as Terry pointed out, this will have user visible effects. This likely should be published as a

[issue34151] use malloc() for better performance of some list operations

2018-08-11 Thread Xiang Zhang
Change by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34151] use malloc() for better performance of some list operations

2018-08-11 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 2fc46979b8c802675ca7fd51c6f2108a305001c8 by Xiang Zhang (Sergey Fedoseev) in branch 'master': bpo-34151: Improve performance of some list operations (GH-8332) https://github.com/python/cpython/commit/2fc46979b8c802675ca7fd51c6f2108a305001c8

[issue34151] use malloc() for better performance of some list operations

2018-07-19 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34151] use malloc() for better performance of some list operations

2018-07-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 This looks like a reasonable improvement. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue34151] use malloc() for better performance of some list operations

2018-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: Nice! Patch looks good to me, minus the usual naming nit-pick. -- nosy: +scoder versions: +Python 3.8 ___ Python tracker ___

[issue34151] use malloc() for better performance of some list operations

2018-07-18 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +7869 stage: -> patch review ___ Python tracker ___ ___

[issue34151] use malloc() for better performance of some list operations

2018-07-18 Thread Sergey Fedoseev
.9 ns: 1.15x faster (-13%) | +--++--+ | 1x3 | 62.5 ns| 54.8 ns: 1.14x faster (-12%) | +--++--+ | 1x100 | 2.67 ms | 2.34 ms: 1.14x faster (-12%) | +---

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I recommend rejecting this proposal -- ___ Python tracker ___ ___

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think I've ever used `in` on an iterator. I didn't even expect it to work, and would not consider its use a good practice. -- nosy: +pitrou ___ Python tracker

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sorry, I mistakenly assumed, without carefully checking the C code, that the speedup was from checking the underlying collection, without advancing the iterator. I presume that " ++it->it_index;" is the statement to the contrary. I should have either asked

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-04 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg299770 ___ Python tracker ___

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Terry, this proposition doesn't change the behavior. It moves the iterator forward during searching. The only effect is inlining __next__ in a loop and getting rid of the overhead of few indirections and calls. --

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: On my particular Win 10 machine with 3.6, the times are 1.52 and 2.14. But to me, the times are irrelevant. A performance enhancement, by definition, should not change computational results, but this does. If an iterator is a standard iterator, then 'x in

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch adds almost 40 line of the code and increases the performance of not well famous feature at best by 10-20%. Adding an optimization for every new iterator type will add a comparable quantity of the code. I think this is too high cost. Using a

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-02 Thread Sergey Fedoseev
1000 loops, best of 3: 1.59 msec per loop -- messages: 299666 nosy: sir-sigurd priority: normal severity: normal status: open title: add __contains__ for list_iterator (and others) for better performance type: performance ___ Python tracker <rep...

[issue31108] add __contains__ for list_iterator (and others) for better performance

2017-08-02 Thread Sergey Fedoseev
Changes by Sergey Fedoseev : -- pull_requests: +3025 ___ Python tracker ___ ___

[issue13653] reorder set.intersection parameters for better performance

2012-01-02 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13653 ___ ___ Python-bugs-list mailing list

[issue13653] reorder set.intersection parameters for better performance

2011-12-23 Thread Andrew Dalke
Andrew Dalke da...@dalkescientific.com added the comment: My belief is that the people who use set.intersection with more than two terms are 1) going to pass in a list of sets, and 2) don't care about the specific order. To check the validity of my belief, I did a Google Code Search to find

[issue13653] reorder set.intersection parameters for better performance

2011-12-23 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Given that equality is not identify, order does matter, although in 3.2.2 the results are the opposite of what one might expect. a = set((1,2,3)) b = set((1.0, 3.0, 5.0)) print(ab, ba) print(a.intersection(b), b.intersection(a)) a = b print(a)

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Andrew Dalke
status: open title: reorder set.intersection parameters for better performance type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file24081/set_intersection_benchmark.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13653 ___

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Thanks guys. I'll look at this in detail when I get a chance. Offhand, it seems like a good idea though it may rarely be of benefit. The only downsides I see are that it overrides the user's ability to specify the application

Re: Better performance

2008-06-03 Thread Paul Boddie
On 2 Jun, 20:16, David [EMAIL PROTECTED] wrote: PHP: Easy to make web pages. Perl: Lots of libraries, good text processing support Python: Easy to read and maintain PHP: For the security vulnerabilities. Perl: For the maintenance problem. Python: To the rescue! ;-) You could even use all

Re: Better performance

2008-06-02 Thread Arnaud Delobelle
Franck Y [EMAIL PROTECTED] writes: Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work'

Re: Better performance

2008-06-02 Thread Bruno Desthuilliers
Franck Y a écrit : Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work' And where's your

Re: Better performance

2008-06-02 Thread David
On Mon, Jun 2, 2008 at 4:42 AM, Franck Y [EMAIL PROTECTED] wrote: Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Trite answer: Use whatever is going to work best in your circumstances. All 3 languages

Better performance

2008-06-01 Thread Franck Y
Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work' Thanks for your help ! --

Better performance

2008-06-01 Thread Franck Y
Hello Folks, I am facing a problem where i need to parse around 200 files, i have a bit of knowledge in PHP/Perl/Python (the magic P :-P) Which one would you suggest me since i have to generate a web interface ? And each one has his area of 'work' Thanks for your help ! --