2017-07-05 11:38
cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs:
https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
00:03
ceridwen has joined #pypy
00:03
tbodt has joined #pypy
00:33
marr has quit [Ping timeout: 240 seconds]
00:38
utek has quit [Ping timeout: 246 seconds]
00:38
utek has joined #pypy
00:41
rokujyouhitoma has joined #pypy
00:45
rokujyouhitoma has quit [Ping timeout: 248 seconds]
01:08
yuyichao has quit [Remote host closed the connection]
01:11
raynold has joined #pypy
01:11
yuyichao has joined #pypy
01:12
<
raynold >
ahh it's a wonderful day :D
01:41
rokujyouhitoma has joined #pypy
01:46
rokujyouhitoma has quit [Ping timeout: 248 seconds]
01:48
exarkun has quit [Ping timeout: 260 seconds]
01:49
exarkun has joined #pypy
01:50
kipras is now known as kipras`away
02:08
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
02:13
yuyichao has quit [Quit: Konversation terminated!]
02:16
yuyichao has joined #pypy
02:17
tbodt has joined #pypy
02:20
tbodt has quit [Client Quit]
02:20
yuyichao_ has joined #pypy
02:21
yuyichao has quit [Ping timeout: 260 seconds]
02:30
yuyichao_ has quit [Quit: Konversation terminated!]
02:32
yuyichao has joined #pypy
02:40
lritter__ has joined #pypy
02:42
rokujyouhitoma has joined #pypy
02:43
ArneBab has joined #pypy
02:44
lritter_ has quit [Ping timeout: 240 seconds]
02:46
rokujyouhitoma has quit [Ping timeout: 248 seconds]
02:47
ArneBab_ has quit [Ping timeout: 240 seconds]
02:47
tbodt has joined #pypy
02:54
windy has joined #pypy
02:58
<
windy >
Hi, I have a question on why pypy choose to call_r for some functions but not for some other functions. For example, descr_bit_length (no jit operator) of W_IntObject will show up as call_r(descr_bit_length) in PYPYLOG, but other descr_add/descr_sub will show up as int_add/int_sub
02:59
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
03:01
<
windy >
Also, I read a bit about rbigint, and found that rbigint.fromint show up in PYPYLog as call_r(ConstClass(fromint), but rbigint._toint_helper is call_i(ConstClass(rbigint._toint_helper). Is there any intuition on this difference? Thanks
03:01
<
simpson >
windy: Those jitcodes usually correspond to only a few assembly instructions. Bit-length isn't an assembly instruction I know of.
03:02
<
Alex_Gaynor >
windy: You get a call() if the RPython function can't be inlined, descr_add/sub on an integer are inlined into the code, so you're left with just the raw int_add/sub operations. The most common reason something isn't inlined is that it contains a loop.
03:02
<
simpson >
call_r and call_i just have different call signatures. There's a call variant for each signature.
03:02
<
Alex_Gaynor >
simpson: There actually is an x86 instruction for computing the number of leading zeros (CLZ) in an integer, but the JIT doesn't know about it
03:03
<
windy >
but according to my experiences call_r is usually faster than call_i. This is just my guess: call_r calls the compiled C code of the function, where call_i calls the interpreter to do some stuff
03:03
<
simpson >
Alex_Gaynor: Oh, TIL.
03:04
<
Alex_Gaynor >
windy: call_r and i are identical, except they have different return types.
03:05
<
Alex_Gaynor >
bit_length could be made faster by splitting out the prologue/epilogue where the integer is unboxed/boxed into a separte function from the loop, so that unboxed ints can stay that way
03:06
<
windy >
Actually it is very fast comparing to the python version .. I copy pasted the code and found that the while loop turned into a bridge, but call_r is just call_r
03:08
<
windy >
thanks Alex for the explanation, would you please expant just a little bit on how the return types are different for call_r and call_i?
03:09
<
Alex_Gaynor >
call_r returns a GC pointer, call_i returns an integer
03:11
<
windy >
oh, so this means that call_r returns a box just like space.newint(whatever)
03:11
<
windy >
interesting, I was totally wrong ... Thanks Alex!
03:14
lritter__ has quit [Quit: Leaving]
03:28
exarkun has quit [Ping timeout: 252 seconds]
03:29
exarkun has joined #pypy
03:34
<
windy >
wait a minute .. If bit_length is indeed inlined, then the while loop should become a bridge in the trace so that would match python code performance then?
03:37
jcea has quit [Quit: jcea]
03:43
rokujyouhitoma has joined #pypy
03:46
windy has quit [Quit: Page closed]
03:47
rokujyouhitoma has quit [Ping timeout: 248 seconds]
04:21
tilgovi has joined #pypy
04:38
pilne has quit [Ping timeout: 240 seconds]
04:39
pilne has joined #pypy
04:44
rokujyouhitoma has joined #pypy
04:48
rokujyouhitoma has quit [Ping timeout: 252 seconds]
04:49
chelz has joined #pypy
04:59
forgottenone has joined #pypy
05:08
exarkun has quit [Ping timeout: 248 seconds]
05:08
exarkun has joined #pypy
05:45
rokujyouhitoma has joined #pypy
05:49
rokujyouhitoma has quit [Ping timeout: 248 seconds]
06:27
forgottenone has quit [Quit: Konversation terminated!]
06:44
tilgovi has quit [Ping timeout: 246 seconds]
06:45
jamesaxl has joined #pypy
06:45
rokujyouhitoma has joined #pypy
06:48
ArneBab has quit [Remote host closed the connection]
06:49
exarkun has quit [Ping timeout: 248 seconds]
06:50
rokujyouhitoma has quit [Ping timeout: 240 seconds]
06:50
exarkun has joined #pypy
06:52
ArneBab has joined #pypy
07:02
dw has quit [Read error: Connection reset by peer]
07:02
dw has joined #pypy
07:04
jamesaxl has quit [Read error: Connection reset by peer]
07:06
jamesaxl has joined #pypy
07:12
jamesaxl has quit [Read error: Connection reset by peer]
07:14
jamesaxl has joined #pypy
07:17
jamesaxl has quit [Read error: Connection reset by peer]
07:18
jamesaxl has joined #pypy
07:26
jacob22_ has joined #pypy
07:46
rokujyouhitoma has joined #pypy
07:49
jamesaxl has quit [Read error: Connection reset by peer]
07:50
jamesaxl has joined #pypy
07:50
vkirilichev has joined #pypy
07:50
rokujyouhitoma has quit [Ping timeout: 246 seconds]
07:55
pilne has quit [Remote host closed the connection]
08:10
rokujyouhitoma has joined #pypy
08:12
<
cfbolz >
windy: it's not safe to inline a function into the trace that has a loop
08:19
vkirilichev has quit [Remote host closed the connection]
08:23
vkirilichev has joined #pypy
08:25
vkirilichev has quit [Remote host closed the connection]
08:26
rokujyouhitoma has quit [Remote host closed the connection]
08:28
vkirilichev has joined #pypy
08:29
exarkun has quit [Ping timeout: 252 seconds]
08:30
vkirilichev has quit [Remote host closed the connection]
08:30
vkirilichev has joined #pypy
08:30
exarkun has joined #pypy
08:32
vkirilichev has quit [Remote host closed the connection]
08:45
vkirilichev has joined #pypy
08:46
vkirilichev has quit [Remote host closed the connection]
08:51
marr has joined #pypy
09:03
antocuni has joined #pypy
09:03
yuyichao has quit [Remote host closed the connection]
09:10
vkirilichev has joined #pypy
09:24
<
kenaan >
arigo default e9c0dff56c4c /pypy/doc/build.rst: PR #565, originally by splasky Add Ubuntu 17.04 (and likely Debian) build time dependencies
09:26
rokujyouhitoma has joined #pypy
09:31
rokujyouhitoma has quit [Ping timeout: 260 seconds]
09:34
<
kenaan >
arigo nogil-unsafe-2 4698de95c523 /rpython/: Rename the operation to reflect the readonly-ness
09:52
vkirilichev has quit [Remote host closed the connection]
10:09
exarkun has quit [Ping timeout: 246 seconds]
10:10
exarkun has joined #pypy
10:22
yuyichao has joined #pypy
10:22
vkirilichev has joined #pypy
10:24
oberstet has joined #pypy
10:25
jamesaxl has quit [Read error: Connection reset by peer]
10:26
antocuni has quit [Ping timeout: 246 seconds]
10:26
jamesaxl has joined #pypy
10:26
vkirilichev has quit [Ping timeout: 240 seconds]
10:27
rokujyouhitoma has joined #pypy
10:31
rokujyouhitoma has quit [Ping timeout: 240 seconds]
10:32
jamesaxl has quit [Read error: Connection reset by peer]
10:32
jamesaxl has joined #pypy
11:06
_whitelogger has joined #pypy
11:09
kolko has joined #pypy
11:25
vkirilichev has joined #pypy
11:28
rokujyouhitoma has joined #pypy
11:29
forgottenone has joined #pypy
11:33
rokujyouhitoma has quit [Ping timeout: 260 seconds]
11:38
hawkowl has joined #pypy
11:50
exarkun has quit [Ping timeout: 240 seconds]
11:51
exarkun has joined #pypy
12:29
rokujyouhitoma has joined #pypy
12:33
rokujyouhitoma has quit [Ping timeout: 240 seconds]
13:09
rokujyouhitoma has joined #pypy
13:13
rokujyouhitoma has quit [Remote host closed the connection]
13:15
rokujyouhitoma has joined #pypy
13:18
jamesaxl has quit [Read error: Connection reset by peer]
13:19
rokujyouhitoma has quit [Remote host closed the connection]
13:20
jamesaxl has joined #pypy
13:28
exarkun has quit [Ping timeout: 240 seconds]
13:29
exarkun has joined #pypy
13:38
rubdos has joined #pypy
13:43
jamesaxl has quit [Read error: Connection reset by peer]
13:44
jamesaxl has joined #pypy
13:51
rubdos has quit [Ping timeout: 246 seconds]
13:54
rubdos has joined #pypy
14:01
rubdos has quit [Ping timeout: 240 seconds]
14:01
rubdos has joined #pypy
14:05
jcea has joined #pypy
14:15
rubdos has quit [Ping timeout: 246 seconds]
14:16
raynold has quit [Quit: Connection closed for inactivity]
14:19
rokujyouhitoma has joined #pypy
14:24
rokujyouhitoma has quit [Ping timeout: 240 seconds]
14:24
pilne has joined #pypy
14:29
kipras`away is now known as kipras
14:42
jamesaxl has quit [Read error: Connection reset by peer]
14:43
jamesaxl has joined #pypy
15:20
rokujyouhitoma has joined #pypy
15:25
rokujyouhitoma has quit [Ping timeout: 248 seconds]
15:28
kolko has joined #pypy
15:41
kolko has joined #pypy
15:59
lritter has joined #pypy
16:07
rubdos has joined #pypy
16:15
rubdos has quit [Ping timeout: 264 seconds]
16:16
rubdos has joined #pypy
16:21
rokujyouhitoma has joined #pypy
16:25
jamesaxl has quit [Read error: Connection reset by peer]
16:26
rokujyouhitoma has quit [Ping timeout: 248 seconds]
16:26
jamesaxl has joined #pypy
16:44
raynold has joined #pypy
16:46
yuyichao has quit [Ping timeout: 252 seconds]
16:48
yuyichao has joined #pypy
16:48
yuyichao has quit [Client Quit]
16:49
yuyichao has joined #pypy
16:50
yuyichao has quit [Remote host closed the connection]
16:55
yuyichao has joined #pypy
16:58
yuyichao has quit [Remote host closed the connection]
16:59
yuyichao has joined #pypy
17:04
yuyichao has quit [Client Quit]
17:05
yuyichao has joined #pypy
17:05
rubdos has quit [Quit: WeeChat 1.9]
17:09
yuyichao_ has joined #pypy
17:09
yuyichao has quit [Ping timeout: 260 seconds]
17:12
yuyichao_ has quit [Client Quit]
17:12
rubdos has joined #pypy
17:13
yuyichao has joined #pypy
17:19
rubdos has quit [Ping timeout: 255 seconds]
17:22
rubdos has joined #pypy
17:22
rokujyouhitoma has joined #pypy
17:23
pilne has quit [Remote host closed the connection]
17:26
rokujyouhitoma has quit [Ping timeout: 248 seconds]
17:31
pilne has joined #pypy
17:51
yuyichao_ has joined #pypy
17:51
yuyichao has quit [Ping timeout: 240 seconds]
18:05
tilgovi has joined #pypy
18:23
rokujyouhitoma has joined #pypy
18:24
vkirilichev has quit [Remote host closed the connection]
18:24
vkirilichev has joined #pypy
18:27
rokujyouhitoma has quit [Ping timeout: 248 seconds]
18:32
tilgovi has quit [Ping timeout: 240 seconds]
18:49
jamesaxl has quit [Quit: WeeChat 1.8]
19:24
rokujyouhitoma has joined #pypy
19:24
nimaje1 has joined #pypy
19:24
nimaje1 is now known as nimaje
19:24
nimaje has quit [Killed (orwell.freenode.net (Nickname regained by services))]
19:28
rokujyouhitoma has quit [Ping timeout: 252 seconds]
20:06
mattip has quit [Ping timeout: 240 seconds]
20:07
mattip has joined #pypy
20:16
kolko has quit [Read error: Connection reset by peer]
20:18
kolko has joined #pypy
20:25
rokujyouhitoma has joined #pypy
20:29
rokujyouhitoma has quit [Ping timeout: 248 seconds]
20:50
ceridwen has quit [Ping timeout: 246 seconds]
20:53
tbodt has joined #pypy
21:23
jacob22_ has quit [Ping timeout: 252 seconds]
21:25
rokujyouhitoma has joined #pypy
21:30
rokujyouhitoma has quit [Ping timeout: 240 seconds]
21:57
oberstet has quit [Ping timeout: 252 seconds]
22:02
forgottenone has quit [Quit: Konversation terminated!]
22:05
marky1991 has joined #pypy
22:14
Yardanico has joined #pypy
22:26
rokujyouhitoma has joined #pypy
22:30
rokujyouhitoma has quit [Ping timeout: 240 seconds]
22:51
marky1991 has quit [Ping timeout: 248 seconds]
22:59
cwillu has quit [Remote host closed the connection]
23:12
vkirilichev has quit [Remote host closed the connection]
23:13
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:14
tbodt has joined #pypy
23:17
tbodt has quit [Client Quit]
23:17
tbodt has joined #pypy
23:18
ronan has quit [Ping timeout: 255 seconds]
23:23
ronan has joined #pypy
23:23
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
23:27
rokujyouhitoma has joined #pypy
23:31
Yardanico has quit [Read error: Connection reset by peer]
23:31
rokujyouhitoma has quit [Ping timeout: 248 seconds]
23:43
vkirilichev has joined #pypy