2017-09-12 15:07
cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs:
https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "nothing compares to the timeshifter, my personal polar expedition in software" - pedronis
00:01
marky1991 has joined #pypy
00:08
marky1991 has quit [Ping timeout: 252 seconds]
00:13
lritter has joined #pypy
00:32
adamholmberg has joined #pypy
00:37
adamholmberg has quit [Ping timeout: 240 seconds]
00:56
Garen has quit [Remote host closed the connection]
00:56
rokujyouhitoma has joined #pypy
01:00
rokujyouhitoma has quit [Ping timeout: 248 seconds]
01:00
exarkun has quit [Ping timeout: 264 seconds]
01:01
exarkun has joined #pypy
01:17
cloudyplain has joined #pypy
01:23
_whitelogger has joined #pypy
01:26
coreteam has joined #pypy
01:34
adamholmberg has joined #pypy
01:39
adamholmberg has quit [Ping timeout: 260 seconds]
01:47
jcea has quit [Quit: jcea]
01:57
rokujyouhitoma has joined #pypy
02:01
rokujyouhitoma has quit [Ping timeout: 240 seconds]
02:14
ArneBab has joined #pypy
02:18
ArneBab_ has quit [Ping timeout: 260 seconds]
02:34
adamholmberg has joined #pypy
02:39
adamholmberg has quit [Ping timeout: 240 seconds]
02:40
exarkun has quit [Ping timeout: 240 seconds]
02:40
exarkun has joined #pypy
02:48
lritter_ has joined #pypy
02:52
lritter has quit [Ping timeout: 240 seconds]
02:57
rokujyouhitoma has joined #pypy
02:57
demonimin has quit [Ping timeout: 264 seconds]
03:01
demonimin has joined #pypy
03:02
rokujyouhitoma has quit [Ping timeout: 248 seconds]
03:08
coreteam has quit [Quit: Leaving]
03:11
cloudyplain has quit [Remote host closed the connection]
03:11
cloudyplain has joined #pypy
03:16
cloudyplain has quit [Ping timeout: 252 seconds]
03:26
pilne has quit [Quit: Quitting!]
03:36
adamholmberg has joined #pypy
03:40
adamholmberg has quit [Ping timeout: 255 seconds]
03:48
cloudyplain has joined #pypy
03:50
cloudyplain has quit [Remote host closed the connection]
03:51
cloudyplain has joined #pypy
03:54
cloudypl_ has joined #pypy
03:57
cloudyplain has quit [Ping timeout: 240 seconds]
03:58
rokujyouhitoma has joined #pypy
03:59
cloudypl_ has quit [Ping timeout: 248 seconds]
04:03
rokujyouhitoma has quit [Ping timeout: 240 seconds]
04:12
jamesaxl has quit [Read error: Connection reset by peer]
04:12
jamesaxl has joined #pypy
04:20
exarkun has quit [Ping timeout: 240 seconds]
04:21
dw_ has joined #pypy
04:21
exarkun has joined #pypy
04:24
plan_rich_ has joined #pypy
04:24
gclawes has joined #pypy
04:25
bogner has joined #pypy
04:25
marmoute_ has joined #pypy
04:25
holdsworth has joined #pypy
04:25
riddle has quit [Disconnected by services]
04:25
riddle has joined #pypy
04:25
_zware has joined #pypy
04:29
lritter_ has quit [*.net *.split]
04:29
dw has quit [*.net *.split]
04:29
__main__ has quit [*.net *.split]
04:29
plan_rich has quit [*.net *.split]
04:29
kenaan has quit [*.net *.split]
04:29
[0__0] has quit [*.net *.split]
04:29
chris| has quit [*.net *.split]
04:29
SunDwarf has quit [*.net *.split]
04:29
shodan45 has quit [*.net *.split]
04:29
holdsworth_ has quit [*.net *.split]
04:29
bogner_ has quit [*.net *.split]
04:29
gclawes_ has quit [*.net *.split]
04:29
Cheery has quit [*.net *.split]
04:29
michaelgreene has quit [*.net *.split]
04:29
fryguybob has quit [*.net *.split]
04:29
zware has quit [*.net *.split]
04:29
marmoute has quit [*.net *.split]
04:30
shodan45 has joined #pypy
04:30
SunDwarf has joined #pypy
04:30
chris| has joined #pypy
04:30
[0__0] has joined #pypy
04:31
fryguybob has joined #pypy
04:31
__main__ has joined #pypy
04:32
cloudyplain has joined #pypy
04:32
Cheery has joined #pypy
04:32
danchr has quit [Ping timeout: 240 seconds]
04:34
danchr has joined #pypy
04:36
michaelgreene has joined #pypy
04:36
adamholmberg has joined #pypy
04:36
lritter_ has joined #pypy
04:41
adamholmberg has quit [Ping timeout: 255 seconds]
05:11
Guest97482 has quit [Ping timeout: 240 seconds]
05:17
ceridwen has quit [Ping timeout: 246 seconds]
05:25
marvin has joined #pypy
05:26
marvin is now known as Guest54772
05:29
ceridwen has joined #pypy
05:30
forgottenone has joined #pypy
05:38
adamholmberg has joined #pypy
05:42
adamholmberg has quit [Ping timeout: 240 seconds]
06:01
exarkun has quit [Ping timeout: 260 seconds]
06:01
exarkun has joined #pypy
06:14
cloudyplain has quit [Remote host closed the connection]
06:15
cloudyplain has joined #pypy
06:24
kenaan has joined #pypy
06:24
<
kenaan >
arigo cffi/cffi 4b0741f26fcd /c/minibuffer.h: Apply the same patch as everyone else
06:31
arigato has joined #pypy
06:31
<
arigato >
mattip: regarding the PySlice_IndicesEx issue
06:32
<
arigato >
one generic way to fix all this mess is to no longer use #define PyFoo PyPyFoo
06:32
<
arigato >
but instead produce "static inline x PyFoo(y, z) { return PyPyFoo(y, z); }"
06:34
<
arigato >
or consider it as part of the refactoring we might do one day: declare them as non-exported function pointers with "void (*PyFoo)(y, z);", and fill all function pointers when the module is first imported
06:34
realitix has joined #pypy
06:38
adamholmberg has joined #pypy
06:41
<
njs >
it's amazing how many stupid problems that PySlice thing has caused
06:43
adamholmberg has quit [Ping timeout: 240 seconds]
07:11
cloudyplain has quit [Remote host closed the connection]
07:11
cloudyplain has joined #pypy
07:16
cloudyplain has quit [Ping timeout: 246 seconds]
07:23
cloudyplain has joined #pypy
07:29
<
kenaan >
arigo cffi/cffi 23fa387f3e05 /doc/source/whatsnew.rst: Document 4b0741f26fcd
07:29
<
kenaan >
arigo cffi/cffi 32ecdbdba707 /: Update version to 1.11.1
07:37
<
kenaan >
arigo default a3a897f9b96e /: Update to cffi 1.11.1
07:38
<
kenaan >
arigo cffi/cffi a5f702205e81 /c/: "char *" => "const char *" until Python 3.7 is happy
07:38
exarkun has quit [Ping timeout: 240 seconds]
07:39
exarkun has joined #pypy
07:40
adamholmberg has joined #pypy
07:44
adamholmberg has quit [Ping timeout: 248 seconds]
07:57
marr has joined #pypy
08:10
arigato has quit [Ping timeout: 240 seconds]
08:22
realitix has quit [Ping timeout: 240 seconds]
08:30
asmeurer_ has quit [Quit: asmeurer_]
08:34
realitix has joined #pypy
08:36
oberstet has joined #pypy
08:41
adamholmberg has joined #pypy
08:43
TheAdversary has quit [Ping timeout: 246 seconds]
08:44
cstratak has joined #pypy
08:44
cstratak has quit [Remote host closed the connection]
08:44
Hasimir has quit [Ping timeout: 240 seconds]
08:44
cstratak has joined #pypy
08:46
adamholmberg has quit [Ping timeout: 260 seconds]
08:46
Hasimir has joined #pypy
08:48
TheAdversary has joined #pypy
08:59
inhahe_ has quit []
08:59
cloudyplain has quit [Ping timeout: 255 seconds]
08:59
cloudyplain has joined #pypy
09:08
inhahe_ has joined #pypy
09:13
the_drow has quit [Ping timeout: 248 seconds]
09:20
exarkun has quit [Ping timeout: 252 seconds]
09:21
exarkun has joined #pypy
09:29
the_drow has joined #pypy
10:01
the_drow has quit [Ping timeout: 255 seconds]
10:14
the_drow has joined #pypy
10:19
arigato has joined #pypy
10:20
infernix has quit [Ping timeout: 255 seconds]
10:37
yuyichao has quit [Ping timeout: 240 seconds]
10:46
_whitelogger has joined #pypy
10:47
adamholmberg has quit [Ping timeout: 240 seconds]
10:49
cloudyplain has quit [Read error: Connection reset by peer]
10:50
ronan has joined #pypy
10:51
<
kenaan >
arigo cffi/cffi[release-1.11] 8adcf995d67c /: hg merge default
10:55
ronan has quit [Read error: Connection reset by peer]
10:59
exarkun has quit [Ping timeout: 248 seconds]
11:00
exarkun has joined #pypy
11:05
ronan has joined #pypy
11:06
marr has quit [Ping timeout: 240 seconds]
11:08
ronan has quit [Read error: Connection reset by peer]
11:12
<
kenaan >
arigo cffi/cffi 989d98a58c95 /c/misc_thread_common.h: More fun with _PyThreadState_Current becoming undefined in 3.7.
11:12
<
kenaan >
arigo cffi/cffi[release-1.11] aadf924dcf23 /c/misc_thread_common.h: hg merge default
11:26
<
kenaan >
arigo cffi/cffi 7005b3b4e54f /doc/source/whatsnew.rst: Mention the fix 989d98a58c95
11:26
<
kenaan >
arigo cffi/cffi[release-1.11] d3e081232b0b /doc/source/whatsnew.rst: hg merge default
11:26
arigato has quit [Quit: Leaving]
11:30
ronan has joined #pypy
11:43
lritter_ has quit [Ping timeout: 240 seconds]
11:44
adamholmberg has joined #pypy
11:48
adamholmberg has quit [Ping timeout: 246 seconds]
11:50
the_drow has quit [Ping timeout: 246 seconds]
11:57
lritter_ has joined #pypy
12:06
the_drow has joined #pypy
12:07
Rhy0lite has joined #pypy
12:18
ronan has quit [Read error: Connection reset by peer]
12:28
<
kenaan >
amauryfa py3.5 826d99189c3b /: Try to fix translation on Windows: skip socket.sendmsg and associated macros.
12:36
lritter_ has quit [Ping timeout: 240 seconds]
12:41
raynold has quit [Quit: Connection closed for inactivity]
12:44
the_drow has quit [Ping timeout: 260 seconds]
12:50
marr has joined #pypy
12:54
adamholmberg has joined #pypy
12:58
the_drow has joined #pypy
13:29
ronan has joined #pypy
13:38
dmalcolm has quit [Remote host closed the connection]
13:39
adamholmberg has quit [Remote host closed the connection]
13:39
adamholmberg has joined #pypy
13:40
the_drow has quit [Ping timeout: 240 seconds]
13:43
adamholmberg has quit [Ping timeout: 246 seconds]
13:44
dmalcolm has joined #pypy
13:45
ronan has quit [Read error: Connection reset by peer]
13:47
ronan has joined #pypy
13:49
adamholmberg has joined #pypy
13:55
the_drow has joined #pypy
14:03
<
kenaan >
fijal default b67bc051d0c1 /pypy/module/_ssl/interp_ssl.py: (fijal, arigo) change 10M to 10k, we have no clue what that number should be
14:09
ronan has quit [Read error: Connection reset by peer]
14:40
jcea has joined #pypy
14:47
Pimster has joined #pypy
14:50
<
Pimster >
pypy 5.8.0, cpython 3.6.2, and cpython 2.7.14 behaves the same as cpython 3
14:52
<
LarstiQ >
Pimster: don't know if pypy3 differs from pypy2 here, but at least doing the elementwise access is slow
14:53
forgottenone has quit [Read error: Connection reset by peer]
14:53
<
Pimster >
I know it's supposed to be slow but cypthon is 10x faster so it seems odd
14:53
<
LarstiQ >
Pimster: how about a.dot(b)?
14:53
<
fijal >
Pimster: no, 10x is not odd at all
14:53
marky1991 has joined #pypy
14:53
<
fijal >
Pimster: we have to emulate refcounting, raw objects and tons of other crap
14:53
<
Pimster >
LarstiQ: the performance of that is the same in cpython and pypy
14:54
<
LarstiQ >
Pimster: ^^ what fijal said
14:54
<
fijal >
it's actually IMPRESSIVE it's only 10x and works at all
14:54
forgottenone has joined #pypy
14:54
<
LarstiQ >
Pimster: keep boundary crossing to a minimum
14:54
<
fijal >
Pimster: we can definitely make it fast, but it seems to be the case like GIL
14:54
<
Pimster >
refcounting what? the loop isn't creating any reference
14:54
<
fijal >
everyone likes to complain about it, but it's not worth even a bit of money to anyone
14:54
<
fijal >
so it's not done
14:55
<
fijal >
Pimster: refcounting to emulate C API from CPython to access numpy
14:55
<
fijal >
if you don't use numpy it'll be like 100x faster than cpy
14:56
<
Pimster >
ok thank you that's why, I wanted to try to see if JIT improved the cpython perfomance but apparently this in not a good usecase
14:57
<
fijal >
if you use numpy, it's using a very complex compatibility layer
14:57
<
LarstiQ >
Pimster: turn the numpy arrays into lists, then do the loop
14:57
<
fijal >
as I said, it's possible to make it very very fast (like 100x)
14:57
<
LarstiQ >
(and maybe use regular floats instead of numpy.float64)
15:00
<
simpson >
Pimster: For the kind of access that you're doing, numpy can be
*slower* than boring array.array or lists. Is this example representative of an actual workload that you have?
15:02
adamholmberg has quit [Remote host closed the connection]
15:03
<
Pimster >
simpson: no it was just an experiment, I don't loop over np arrays
15:04
realitix has quit [Ping timeout: 248 seconds]
15:04
<
Pimster >
indeed with a normal list pypy runs in 285ms and cpython in 1900ms
15:05
<
Pimster >
with dot product in numpy 19 ms
15:06
<
fijal >
Pimster: it would be even faster if you put it in a functions
15:08
<
fijal >
Pimster: also 19ms must exclude allocation time right?
15:09
<
fijal >
second run is 19ms on my computer
15:09
<
Pimster >
fijal: yes without allocation
15:10
adamholmberg has joined #pypy
15:10
<
fijal >
(on pypy if you exclude allocation)
15:17
realitix has joined #pypy
15:19
<
Pimster >
I get 66ms on your snippet excluding allocation, 200ms if I use a list of float random values instead of 0s
15:20
<
fijal >
so the creation of floats must put Nones or ints there and make it less efficient
15:20
<
fijal >
use array module for example to force it
15:21
<
fijal >
how do you get 66ms?
15:21
<
fijal >
I mean - 66ms might include JIT compilation, run it a few times?
15:23
jcea has quit [Quit: jcea]
15:32
<
Pimster >
maybe there's some degree of lazyness when dot() is on [0.] * 1000000 because if I run dot() on np.zero(1000000).tolist() it's 3x slower (also excluding allocation)
15:32
<
kenaan >
cfbolz regalloc-playground ad2fa98841d9 /: merge default
15:32
<
kenaan >
cfbolz regalloc-playground 81d83bb43b83 /rpython/jit/backend/x86/: adapt to use of constants in the new call hint code
15:36
jcea has joined #pypy
15:39
<
fijal >
Pimster: np.zero().tolist() will not create an optimized list
15:39
<
fijal >
or in fact will create a very shitty list that's optimized for usage with CPython C API
15:39
<
fijal >
Pimster: generally speaking, if you want speed don't touch numpy APIs at all
15:47
<
LarstiQ >
that can be made more nuanced, but having to emulate the cpython api is a real cost
15:48
yuyichao has joined #pypy
15:55
<
Pimster >
well in the end it seems that running np.dot on 2 arrays which are cache hot is just twice as faster as the pypy function on two cache hot lists
15:56
<
Pimster >
I have an ipython notebook if you want to see the results
15:58
<
pjenvey >
fijal: I was just wondering about that SSLContext memory pressure size
15:59
<
pjenvey >
SSLSocket needs one (I'm not sure what size)
15:59
<
fijal >
Pimster: 2x seems about right
16:02
infernix has joined #pypy
16:05
<
pjenvey >
it might be larger than 10k with the cert store
16:06
<
pjenvey >
Alex_Gaynor: you must know the averge sizeof every openssl struct by now, what's a good memory pressure size? =]
16:06
<
Alex_Gaynor >
pjenvey: uhh, for what?
16:07
<
pjenvey >
SSLContext (ctx) and _SSLSocket (SSL and maybe an x509 peer cert)
16:08
<
Alex_Gaynor >
x509 certs are big, maybe 1024 bytes
16:09
<
Alex_Gaynor >
shit an SSL* is huge as well
16:12
<
pjenvey >
yea isn't it just > 10k per connection overhead or so
16:13
<
Alex_Gaynor >
a lot of that is in the buffers, which are managed dynamically
16:15
<
fijal >
Alex_Gaynor: I changed 10M to 10k
16:18
realitix has quit [Ping timeout: 260 seconds]
16:30
_zware is now known as zware
16:34
ronan has joined #pypy
16:48
ronan has quit [Ping timeout: 252 seconds]
16:51
Arfrever has joined #pypy
16:52
raynold has joined #pypy
17:00
cstratak has quit [Ping timeout: 260 seconds]
17:00
asmeurer_ has joined #pypy
17:01
<
Alex_Gaynor >
fijal: 10k seems reasonable
17:03
oberstet has quit [Ping timeout: 260 seconds]
17:08
Arfrever has quit [Ping timeout: 255 seconds]
17:11
<
kenaan >
fijal memory-accounting 336c50a8852e /rpython/: (arigo, fijal) start a new branch that tries to account better for tracked memory
17:16
forgottenone has quit [Read error: Connection reset by peer]
17:16
forgottenone has joined #pypy
17:20
oberstet has joined #pypy
18:46
cstratak has joined #pypy
18:53
cstratak has quit [Ping timeout: 248 seconds]
19:05
marky1991 has quit [Ping timeout: 252 seconds]
19:24
Rhy0lite has quit [Quit: Leaving]
19:24
jamesaxl has quit [Read error: Connection reset by peer]
19:25
jamesaxl has joined #pypy
19:27
<
mattip >
could someone merge default into py3.5 to get cffi 1.11.1 before the release?
19:31
<
kenaan >
mattip default c1b14bf66a8e /pypy/doc/release-v5.9.0.rst: be more positive about numpy,pandas
19:31
<
kenaan >
mattip release-pypy3.5-5.x 24686d8f9ef3 /: merge py3.5 into branch
19:31
<
kenaan >
mattip default 46f3190ace68 /pypy/doc/release-v5.9.0.rst: update release notes for latest merges
19:31
<
kenaan >
mattip release-pypy2.7-5.x fedadd23d48b /: merge default into release for cffi 1.11.1
19:31
<
kenaan >
mattip py3.5 611fac54ebfd /pypy/module/cpyext/test/test_memoryobject.py: fix for c-89 (visual 9) compilation
19:39
<
pjenvey >
Alex_Gaynor: how does about 6k sound
19:39
<
Alex_Gaynor >
pjenvey: as random as anything else; sure, ship it.
19:43
<
kenaan >
pjenvey default 4302fe3d912e /pypy/module/_ssl/interp_ssl.py: unscientific memory pressure estimate of =~ 6k for SSL*
19:43
<
kenaan >
pjenvey release-pypy2.7-5.x e3ab7b0bd8ac /pypy/module/_ssl/interp_ssl.py: merge default
19:43
marky1991 has joined #pypy
20:08
Hasimir has quit [Ping timeout: 240 seconds]
20:08
<
mattip >
let's see if nightly tests pass before I start the release cycle
20:08
Hasimir has joined #pypy
20:09
<
nanonyme >
mattip, do they usually pass?
20:09
<
mattip >
nanonyme: ^^^
20:12
marky1991 has quit [Ping timeout: 246 seconds]
20:16
<
nanonyme >
That import lock count changing looks basically like magic to me
20:18
<
nanonyme >
I guess I shouldn't expect to understand when the test code is written in RPython :p
20:18
forgottenone has quit [Quit: Konversation terminated!]
20:19
<
mattip >
nanonyme: it crept with the fix for issue 2628, changeset 167b802baf3b
20:19
ronan has joined #pypy
20:20
<
mattip >
yet another example of trying to duplicate silly CPython corner cases with magic
20:22
<
mattip >
note that it passes translated, but fails untranslated, running tests untranslated is magic**2
20:26
<
ronan >
mattip: pypy3 nightly can't import pandas :-(
20:27
<
mattip >
ronan: what's missing?
20:28
<
ronan >
mattip: there's some obscure incompatibility in code that runs at import time
20:28
* mattip
looking at lxml 4, issue 2666
20:28
<
ronan >
TypeError: descriptor '_maybe_convert_freq' requires a 'pandas._libs.period._Period' object but received a 'type'
20:29
<
ronan >
while executing pandas/core/indexes/period.py(222) = "freq = Period._maybe_convert_freq(freq)"
20:29
<
mattip >
maybe some kind of parse error on the name, too many or too few pieces in the type name?
20:30
<
ronan >
no, it looks like it's because we have a bound metaclass method
20:31
marky1991 has joined #pypy
20:34
<
ronan >
ah no, it's something about classmethods in Cython cdef classes
20:38
<
ronan >
I'll look at it tomorrow - I'm too zombified to do it today
20:54
<
mattip >
cool. it seems I will try to fix the lxml error which also seems to be a cython/pypy interaction issue
21:14
kipras has quit [Ping timeout: 246 seconds]
21:17
ronan has quit [Ping timeout: 252 seconds]
21:19
kipras has joined #pypy
21:32
adamholmberg has quit [Remote host closed the connection]
21:32
adamholmberg has joined #pypy
21:37
adamholmberg has quit [Ping timeout: 248 seconds]
21:44
yuyichao_ has joined #pypy
21:45
yuyichao has quit [Ping timeout: 248 seconds]
22:06
coreteam has joined #pypy
22:16
yuyichao has joined #pypy
22:16
yuyichao_ has quit [Ping timeout: 248 seconds]
22:21
pilne has joined #pypy
22:27
cloudyplain has joined #pypy
22:27
cloudyplain has quit [Remote host closed the connection]
22:28
coreteam has quit [Quit: Leaving]
22:38
<
kenaan >
pjenvey default 943002f74290 /pypy/doc/release-v5.9.0.rst: blurb 4302fe3d912e & b67bc051d0c1
22:49
TheAdversary has quit [Ping timeout: 260 seconds]
22:49
Hasimir has quit [Ping timeout: 240 seconds]
23:07
marky1991 has quit [Ping timeout: 252 seconds]
23:16
cloudyplain has joined #pypy
23:21
demonimin has quit [Ping timeout: 240 seconds]
23:21
demonimin has joined #pypy
23:23
cloudyplain has quit [Remote host closed the connection]
23:24
cloudyplain has joined #pypy
23:28
cloudyplain has quit [Ping timeout: 240 seconds]
23:31
demonimin has quit [Ping timeout: 248 seconds]
23:33
demonimin has joined #pypy
23:33
demonimin has joined #pypy
23:36
yuyichao has quit [Ping timeout: 260 seconds]
23:40
marky1991 has joined #pypy
23:51
marky1991 has quit [Ping timeout: 260 seconds]
23:52
yuyichao has joined #pypy