[issue24700] array compare is hideously slow

2017-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Adrian's PR was merged. Thank you Adrian! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue24700] array compare is hideously slow

2017-08-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 7c17e2304b9387f321c813516bf134e4f0bd332a by Antoine Pitrou (Adrian Wielgosik) in branch 'master': bpo-24700: Add a fast path for comparing array.array of equal type (#3009)

[issue24700] array compare is hideously slow

2017-08-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue24700] array compare is hideously slow

2017-08-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: The PR looks very reasonable. This is a nice optimization. -- nosy: +rhettinger ___ Python tracker ___

[issue24700] array compare is hideously slow

2017-08-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not saying that this issue shouldn't be fixed, but Numpy arrays are a much more powerful and well-optimized replacement for array.array. -- nosy: +pitrou ___ Python tracker

[issue24700] array compare is hideously slow

2017-08-06 Thread Adrian Wielgosik
Adrian Wielgosik added the comment: Added a PR with a fast path that triggers when compared arrays store values of the same type. In this fast path, no Python objects are created. For big arrays the runtime reduction can reach 50-100x. It's possible to optimize the comparison loop a bit more

[issue24700] array compare is hideously slow

2017-08-06 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : -- pull_requests: +3042 ___ Python tracker ___ ___

[issue24700] array compare is hideously slow

2017-02-27 Thread lou1306
lou1306 added the comment: I noticed the issue is still there in Python 3.6. But I can't see why array subclasses should be the reason for this implementation. By looking at getarrayitem, it looks like __getitem__ does not play any role in how the elements are accessed. Consider the attached

[issue24700] array compare is hideously slow

2015-07-23 Thread swanson
New submission from swanson: Comparing two array.array objects is much slower than it ought to be. The whole point of array.array is to be efficient: array — Efficient arrays of numeric values But comparing them is orders of magnitude less efficient than comparing tuples or lists of numbers.

[issue24700] array compare is hideously slow

2015-07-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: You're correct about what is going on; aside from bypassing a bounds check (when not compiled with asserts enabled), the function it uses to get each index is the same as that used to implement indexing at the Python layer. It looks up the getitem function

[issue24700] array compare is hideously slow

2015-07-23 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: +Python 3.6 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24700 ___