On 11/08/11 13:50, Shawn Walker wrote:
Greetings,

The following webrev contains changes to improve the performance of
python 2.6 and python 2.7 by using profile-guided optimisation during
compilation:

6771457 explore compiler performance improvements for python

https://cr.opensolaris.org/action/browse/pkg/swalker/pyopt/webrev/

Build workspaces can be found on coupe (x86) and kodiak (sparc) under:

/builds/swalker/userland/components/python/python2(6|7)/

Using a profile-guided build for python2.6 and python2.7 along with
raising the minimum processor target for compilation significantly
improves the performance of pkg(5), and likely all Python programs based
on the results of pybench comparisons.

x86 32-bit python2.6 pybench results:
=====================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 5086ms 4238ms +20.0% 5108ms 4252ms +20.1%
(this=/var/tmp/py26-32.pybench, other=/var/tmp/py26-32-profiled.pybench)


x86 64-bit python2.6 pybench results:
=====================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 4038ms 3370ms +19.8% 4053ms 3390ms +19.5%

(this=/var/tmp/py26-64.pybench, other=/var/tmp/py26-64-profiled.pybench)


x86 32-bit python2.7 pybench results:
=====================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 4944ms 4349ms +13.7% 4962ms 4368ms +13.6%

(this=/var/tmp/py27-32.pybench, other=/var/tmp/py27-32-profiled.pybench)


x86 64-bit python2.7 pybench results:
=====================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 4046ms 3443ms +17.5% 4058ms 3466ms +17.1%

(this=/var/tmp/py27-64.pybench, other=/var/tmp/py27-64-profiled.pybench)



sparc m5000 32-bit python2.6 pybench results:
=============================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 11498ms 9494ms +21.1% 11840ms 9528ms +24.3%

(this=/tmp/swalker/py26-32.pybench,
other=/tmp/swalker/py26-32-profiled.pybench)

sparc m5000 64-bit python2.6 pybench results:
=============================================
Test minimum run-time average run-time
this other diff this other diff
Totals: 12540ms 10536ms +19.0% 12617ms 10575ms +19.3%

(this=/tmp/swalker/py26-64.pybench,
other=/tmp/swalker/py26-64-profiled.pybench)


This improvement can also be seen in pkg(5):

x86 32-bit python2.6 from b175:
===============================
ptime pkg -R / update -nv > /dev/null
real 1:39.943325504
user 1:33.977041158
sys 5.955035677

actionbench.py:
action creation
0.310945 64320 actions/sec
0.310566 64398 actions/sec
0.310471 64418 actions/sec
action comparison
1.454264 357569 action comparisons/sec
1.477595 351923 action comparisons/sec
1.467335 354383 action comparisons/sec
minimalist comparison
0.531730 977940 comparisons/sec
0.527154 986429 comparisons/sec
0.532142 977182 comparisons/sec
action to string conversion
3.224444 80634 actions to string/sec
3.220084 80743 actions to string/sec
3.221199 80715 actions to string/sec
manifest contents loading
1.652426 605 manifest contents loads/sec (36310 actions/sec)
1.655008 604 manifest contents loads/sec (36253 actions/sec)
1.654923 604 manifest contents loads/sec (36255 actions/sec)
id() speed
0.133338 7499738 calls to id(action) /sec
0.133082 7514169 calls to id(action) /sec
0.132860 7526722 calls to id(action) /sec

x86 32-bit python2.6 optimised:
===============================
ptime pkg -R / update -nv > /dev/null
real 1:22.288139327
user 1:16.312897228
sys 5.801806561

actionbench.py:
action creation
0.245950 81317 actions/sec
0.246739 81057 actions/sec
0.246119 81261 actions/sec
action comparison
1.144209 454462 action comparisons/sec
1.136154 457684 action comparisons/sec
1.146277 453642 action comparisons/sec
minimalist comparison
0.427626 1216016 comparisons/sec
0.422308 1231328 comparisons/sec
0.428317 1214053 comparisons/sec
action to string conversion
2.407640 107989 actions to string/sec
2.402047 108241 actions to string/sec
2.398144 108417 actions to string/sec
manifest contents loading
1.378746 725 manifest contents loads/sec (43517 actions/sec)
1.380922 724 manifest contents loads/sec (43449 actions/sec)
1.382919 723 manifest contents loads/sec (43386 actions/sec)
id() speed
0.120545 8295646 calls to id(action) /sec
0.124607 8025241 calls to id(action) /sec
0.119417 8374020 calls to id(action) /sec

sparc m5000 32-bit python2.6 from b175:
=======================================
action creation
0.622753 32115 actions/sec
0.629293 31781 actions/sec
0.621584 32175 actions/sec
action comparison
3.666357 141830 action comparisons/sec
3.661959 142000 action comparisons/sec
3.662311 141986 action comparisons/sec
minimalist comparison
1.362751 381581 comparisons/sec
1.368484 379982 comparisons/sec
1.363682 381320 comparisons/sec
action to string conversion
6.733466 38613 actions to string/sec
6.720067 38690 actions to string/sec
6.726436 38653 actions to string/sec
manifest contents loading
2.876231 347 manifest contents loads/sec (20860 actions/sec)
2.878954 347 manifest contents loads/sec (20840 actions/sec)
2.872277 348 manifest contents loads/sec (20889 actions/sec)
id() speed
0.260982 3831681 calls to id(action) /sec
0.261820 3819416 calls to id(action) /sec
0.262322 3812106 calls to id(action) /sec

sparc m5000 32-bit python2.6 optimised:
=======================================
action creation
0.525657 38047 actions/sec
0.531760 37610 actions/sec
0.527871 37888 actions/sec
action comparison
2.906525 178907 action comparisons/sec
2.904150 179054 action comparisons/sec
2.900957 179251 action comparisons/sec
minimalist comparison
1.132462 459176 comparisons/sec
1.129683 460306 comparisons/sec
1.129652 460318 comparisons/sec
action to string conversion
5.389173 48244 actions to string/sec
5.388090 48254 actions to string/sec
5.382943 48300 actions to string/sec
manifest contents loading
2.399956 416 manifest contents loads/sec (25000 actions/sec)
2.419496 413 manifest contents loads/sec (24798 actions/sec)
2.404365 415 manifest contents loads/sec (24954 actions/sec)
id() speed
0.219059 4564980 calls to id(action) /sec
0.220021 4545020 calls to id(action) /sec
0.219128 4563544 calls to id(action) /sec

Anyone?

-Shawn

_______________________________________________
userland-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/userland-discuss

Reply via email to