[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-22 Thread S Safihre

New submission from S Safihre:

I have a Python 2.7 C-extension that was made for performance, however, I 
noticed something strange on Windows:
When I run locally python setup.py install and it installs it the "egg" way, 
the performance of calling the function in the module 500x in a loop is:

 yEnc C New  took   579 ms
 yEnc C New  took   580 ms
 yEnc C New  took   580 ms

But when I install it as a wheel locally or via pip without a single change to 
the C-code, this is the result:

 yEnc C New  took   702 ms
 yEnc C New  took   694 ms
 yEnc C New  took   691 ms

That's a 10-15% difference. I also checked macOS and Ubuntu, here it does not 
seem to be the case.
By investigating (https://github.com/pypa/setuptools/issues/1154) I found that 
the difference is only that the "egg" way the module gets loaded via 
imp.load_dynamic 

I cannot test under Python 3, since the module is (not yet) converted to Python 
3-style.


To reproduce run and look at the yEnc C New score between the 2 ways (on 
Windows only of course):

git clone https://github.com/sabnzbd/sabyenc.git
cd sabyenc
python setup.py install
python .\tests\speed_compare.py; python .\tests\speed_compare.py;python 
.\tests\speed_compare.py;
pip uninstall sabyenc -y

pip install sabyenc
# Or this:
# python setup.py install bdist_wheel
# pip install .\dist\sabyenc-3.3.1-cp27-cp27m-win_amd64.whl
python .\tests\speed_compare.py; python .\tests\speed_compare.py;python 
.\tests\speed_compare.py;

--
components: Extension Modules, Windows
messages: 302768
nosy: S Safihre, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows pyd slower when not loaded via load_dynamic
type: performance
versions: Python 2.7

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31555>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-12-12 Thread S Safihre

S Safihre added the comment:

>From the changelog I interpreted this to mean that Python would now use 
>OpenSSL 1.0.2j on macOS for it's ssl module.
But this is not the case?
On a fresh macOS Sierra VM I get:

Python 2.7.13rc1 (v2.7.13rc1:4d6fd49eeb14, Dec  3 2016, 13:01:23) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 0.9.8zh 14 Jan 2016'

--
nosy: +S Safihre

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28248>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com