00:11
forgottenone has quit [Quit: Konversation terminated!]
01:56
Gustavo6046 is now known as TotallyNotGus
01:56
TotallyNotGus is now known as Gustavo6046
02:30
Gustavo6046 has joined #pypy
03:34
jcea has quit [Ping timeout: 260 seconds]
04:39
oberstet has quit [Remote host closed the connection]
07:17
<
mattip >
here is a benchmark where processing python3 str is 8x slower on PyPy than when using CPython + C-API
07:18
<
mattip >
the issue came up because the package is pure python, but has a _speedup module that reimplements using the C-API
07:29
<
cfbolz >
mattip: do you have a link to the speedup version too?
07:29
<
cfbolz >
The C code I mean?
07:33
<
mattip >
we are slower on the pure-python version. Here is a complete runnable
07:35
<
mattip >
here is the C file, it is not as compact as the python version
07:37
<
cfbolz >
I suspect just copying the C algorithm to python would be faster. The series of replaces not great
07:40
<
cfbolz >
Anyway: snow snow snow!
07:52
jacob22_ has quit [Quit: Konversation terminated!]
08:19
otisolsen70_ has joined #pypy
08:20
otisolsen70_ has quit [Client Quit]
08:23
otisolsen70 has quit [Ping timeout: 240 seconds]
08:50
forgottenone has joined #pypy
08:53
<
mattip >
running the script without the JIT gives exactly the same timing. I guess there is not much the JIT can do with those str.replace() calls
08:58
muke has joined #pypy
10:12
<
cfbolz >
mattip: yes
11:02
muke has quit [Remote host closed the connection]
11:03
muke has joined #pypy
11:58
jcea has joined #pypy
13:27
muke has quit [Quit: Leaving]
17:14
<
cfbolz >
mattip: our replace is bad, particularly if the search-string is 1 char
17:16
<
mattip >
the idea to chain str.replace().replace().replace() is going to be slow even if our replace is optimal: that is four passes over str.
17:17
<
mattip >
can we fuse those loops? That seems complicated
17:18
<
mattip >
the c-code does one pass and optimizes for no-marker-found
18:08
<
cfbolz >
mattip: agreed, handwriting this is definitely still better
18:08
<
cfbolz >
mattip: but still, the replace calls should be more efficient
18:41
jacob22 has joined #pypy
20:03
<
mattip >
ByteListBuilder uses the init_size argument in the initializer for newlist. Does StringBuilder ever use init_size?