[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2018-12-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10409

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2016-03-12 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2016-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I am not able to find the cause of the slowdown.

I think this issue can be closed now. The etree_parse and etree_iterparse 
benchmarks are working appropriately and showing real regression in CPython 
3.x. The cause of the regression is not known.

--
assignee: serhiy.storchaka -> 

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Brett. Now the parse benchmark in 3.6 is only 50% 
slower than in 2.7. Will continue to find bottlenecks.

--
stage: patch review -> 

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Following patch speeds up ElementTree parsing (the result of the etree parse 
benchmark is improved by 10%). Actually it restores 2.7 code and avoids 
creating an empty dict for attributes if not needed.

--
stage:  -> patch review
Added file: http://bugs.python.org/file41276/etree_start_handler_no_attrib.patch

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1fe904420c20 by Serhiy Storchaka in branch 'default':
Issue #25638: Optimized ElementTree parsing; it is now 10% faster.
https://hg.python.org/cpython/rev/1fe904420c20

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The iterparse benchmark in 3.6 still is 30% slower than in 2.7. The parse 
benchmark is 70% slower. Hence there are other causes of the slowing down.

One of causes is that in 3.x an empty dict instead of None is passed to start 
handler as attrib parameter if the start tag has no attributes. This makes 
parsing parsing about 10% slower.

--
stage: commit review -> 

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Brett. First than apply this optimization I want to 
fix errors propagating issue (issue25814). The patch for it is mainly the 
simplified part of the patch for this issue.

--
dependencies: +Propagate all errors from ElementTree.iterparse

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dd67c8c53aea by Serhiy Storchaka in branch 'default':
Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.
https://hg.python.org/cpython/rev/dd67c8c53aea

--
nosy: +python-dev

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-12-05 Thread Brett Cannon

Brett Cannon added the comment:

Serhiy's latest patch LGTM.

--
assignee: brett.cannon -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated to tip.

--
Added file: http://bugs.python.org/file41167/etree_iterparse_2.patch

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch optimizes iterparse(). Now it is only 33% slower than in 2.7 
(was 2.6 times slower).

--
components: +Extension Modules, Library (Lib), XML
keywords: +patch
nosy: +eli.bendersky, scoder
stage:  -> patch review
type:  -> performance
versions: +Python 3.6
Added file: http://bugs.python.org/file41110/etree_iterparse.patch

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Brett Cannon

Brett Cannon added the comment:

The commands I used are in the notebook for each implementation and you can get 
the same result with `python3 perf.py -b etree python2 python3`.

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry Brett.

How tests were ran? There are two implementations of ElementTree, accelerated 
and non-accelerated. xml.etree.ElementTree by default is accelerated in Python 
3, but non-accelerated in Python 2.

$ python2.7 bm_elementtree.py -n 7 --take_geo_mean 
0.463665158795
$ python2.7 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree
5.46309932568
$ python3.4 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree
0.813397633467649
$ python3.4 bm_elementtree.py -n 7 --take_geo_mean 
--etree-module=xml.etree.ElementTree --no-accelerator
5.31174765817514

If run the test with the same options --etree-module=xml.etree.ElementTree, it 
will use accelerated implementation in Python 3 and non-accelerated in Python 2.

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The slowing down Python 3 can be related to adding XMLPullParser (issue17741).

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Brett Cannon

Brett Cannon added the comment:

Let's not pollute the issue with a critique of my notebook. You can feel free 
to email me personally to discuss it if you want, including why I purposefully 
didn't use a logarithmic scale.

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think these histograms would look better with logarithmic scale.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, so when you say "horrible for everyone", this is really IronPython and 
Jython, right? :-) Other runtimes seem to do ok (perhaps not stellar, but ok).

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Brett Cannon

Brett Cannon added the comment:

That link is to a Jupyter notebook so you don't have to watch anything. Plus 
the video is not even up yet so you can't skip the keynote even if you wanted 
to since you can't watch it yet. :)

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Brett Cannon

New submission from Brett Cannon:

If you look at bit.ly/pycon-ca-keynote you will notice that the etree_parse and 
etree_iterparse benchmarks were horrible for everyone. Because of how badly 
everyone seemed to do, I think the benchmarks should be verified to be doing 
reasonable things on implementations other than CPython 2.7.

--
components: Benchmarks
messages: 254746
nosy: brett.cannon, pitrou
priority: normal
severity: normal
status: open
title: Verify the etree_parse and etree_iterparse benchmarks are working 
appropriately

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Brett Cannon

Brett Cannon added the comment:

Well, Jython and IronPython obviously did the worst, but even Python 3 didn't 
do as well as I would have expected, so I still want to double-check the 
benchmarks to see if it's obvious why CPython 2.7 beats out everyone.

--

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Would you have a quick summary for those not willing to watch a whole keynote?

--

___
Python tracker 

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