00:59
lritter has quit [Ping timeout: 256 seconds]
01:16
lritter has joined #pypy
03:20
lritter has quit [Quit: Leaving]
06:02
Joannah has joined #pypy
06:11
Joannah has quit [Quit: Ping timeout (120 seconds)]
06:17
Joannah has joined #pypy
06:32
Joannah has quit [Quit: Ping timeout (120 seconds)]
06:33
Joannah has joined #pypy
06:39
Joannah has quit [Quit: Ping timeout (120 seconds)]
06:58
Joannah has joined #pypy
07:04
Joannah has quit [Quit: Ping timeout (120 seconds)]
09:18
andythenorth has joined #pypy
09:18
<
andythenorth >
morning (EU TZ)
09:18
<
andythenorth >
picking up a chat from mailing list...
09:19
<
andythenorth >
I am using pypy3 on m1 mac; I'm not a programmer but I use pypy to compile game mods
09:19
<
andythenorth >
I've compiled on m1 with x86, and it's roughly same performance as on intel i9 mac, some things faster, some slower
09:20
<
andythenorth >
I can contribute funds directly towards an m1 for a pypy3 dev, not the whole price of a mac mini or macbook air
09:21
<
andythenorth >
but I spend hundreds of hours per year of hobby time on these mods, and saving 4 or 5 seconds on compiling really improves cycle time
09:21
<
andythenorth >
I could easily put in 1/3 of the cost of a mac mini at UK prices
09:22
<
andythenorth >
and it would be nice to support a very valuable open source project
09:23
<
cfbolz >
andythenorth: hey :-)
09:24
<
cfbolz >
we have a mac mini available and ordered a laptop
09:24
<
andythenorth >
excellent
09:24
<
andythenorth >
need any funds?
09:24
<
andythenorth >
happy to do that
09:24
<
cfbolz >
but something else you could do, that would actually be extremely valuable: wanna write a blog post?
09:25
<
cfbolz >
just write a bit how you're using pypy
09:25
<
andythenorth >
now you ask the hard questions :D
09:25
<
cfbolz >
andythenorth: it's not urgent or anything, just think about it :-)
09:25
<
andythenorth >
I will put a couple of lines of background here, to give me some ideas
09:26
<
cfbolz >
(we're really interested anyway ;-) )
09:26
<
andythenorth >
I'm a contrib to OpenTTD, which, not talking ourselves up too much, is pretty much the most successful open source game
https://www.openttd.org/
09:27
<
andythenorth >
the main mods are compiled to an archaic bytecode format, which we (not me) wrote an intermediate python compiler for
09:28
<
andythenorth >
it historically was dog slow, especially under python 2
09:28
<
andythenorth >
it has got faster and faster under python 3, and has caching between runs, and a small amount of c module I believe
09:28
<
andythenorth >
but on intel mac at least, pypy3 was typically twice as fast in many cases
09:29
<
andythenorth >
cutting cycle times from e.g. 40s to 20s, which is a big deal when drawing tiny pixel changes and testing them in game
09:30
<
andythenorth >
I also do a bunch of automated graphics processing using PIL / Pillow which is also typically faster under pypy3
09:30
<
cfbolz >
oh nice! I had no clue that Pillow benefits from pypy
09:30
<
andythenorth >
although parallelising that via multiprocessing pool made the biggest difference
09:30
<
cfbolz >
makes sense
09:31
<
andythenorth >
I think the pillow improvement is subjective to workload, I am not good at profiling though :)
09:31
<
andythenorth >
I just run 'time make'
09:31
<
andythenorth >
and try different pythons
09:31
<
cfbolz >
that's a good approach ;-)
09:32
<
andythenorth >
I actually code generate the mod language from pure python and abuse of Chameleon (zope/pyramid) templates
09:32
<
andythenorth >
Chameleon is not intended for that, but I know how to use it and it works
09:33
<
andythenorth >
interestingly, last time I tested, Chameleon was notably slower under pypy3
09:33
<
andythenorth >
it pre-compiles templates to pyc, not sure of the details, but maybe that approach is in conflict with JIT (I am out of my depth)
09:34
<
cfbolz >
andythenorth: ah, interesting! did you try with the recent pypy 3.8 beta release?
09:34
* andythenorth
looks
09:34
<
andythenorth >
there's no build tool, deps are listed in the docs somewhere though
09:34
<
cfbolz >
we made a change in the recent 3.8 there that has a pretty decent chance to improve chameleon for complicated templates
09:35
<
andythenorth >
oh that's interesting
09:35
<
andythenorth >
is it a known case then?
09:35
<
cfbolz >
andythenorth: not chameleon specifically
09:36
<
cfbolz >
but templating engines that generate code in general
09:36
<
cfbolz >
not really known, we found out this year
09:36
<
andythenorth >
looks like I have `[PyPy 7.3.7 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.3)] on darwin`
09:37
<
andythenorth >
can't remember if I compiled it or installed the binary
09:38
<
andythenorth >
oh you have nightlies ok
09:38
<
cfbolz >
yeah, you could try a 3.8 nightly
09:40
<
cfbolz >
andythenorth: anyway, this is all quite fascinating :-)
09:43
* andythenorth
just trying to install the beta safely without trashing my env and paths :D
09:43
<
andythenorth >
I will compare times
09:54
<
andythenorth >
hmm something is broken with Pillow when I pip install to the 3.8 beta :)
09:54
<
andythenorth >
I'm not great at resolving that kind of issue, but it's not urgent
09:57
<
cfbolz >
andythenorth: something deep in your setup, I assume?
09:57
<
andythenorth >
probably :)
09:58
<
andythenorth >
I seem to have broken my previous pypy3 venv, but I'll figure it out somehow
09:58
<
cfbolz >
anyway, if you want to, this is clearly very cool, we should just dump it into a post. The numbers don't even matter too much
10:02
<
andythenorth >
yup I will hang out in this channel for a bit and do a post at some point :)
10:18
<
andythenorth >
timings for 3.10 official binary with arm, vs pypy3 x86 running in rosetta2
10:18
<
andythenorth >
../../pypy3/bin/nmlc -l generated/lang --verbosity=4 generated/iron-horse.nm 11.01s user 1.02s system 98% cpu 12.212 total
10:18
<
andythenorth >
nmlc -l generated/lang --verbosity=4 --nfo=generated/iron-horse.nfo 23.92s user 0.83s system 99% cpu 24.889 total
10:18
<
andythenorth >
even on transpiled x86, that's twice as fast
10:19
<
andythenorth >
this is super helpful when just tweaking a few pixels etc
10:19
<
andythenorth >
this is the m1 pro, 10 core thing
10:19
<
andythenorth >
obvs only loads one core
10:39
<
andythenorth >
same python 310 / pypy3, but for the chameleon part of the pipeline
10:39
<
andythenorth >
python src/render_nml.py 1.93s user 0.12s system 94% cpu 2.162 total
10:40
<
andythenorth >
python src/render_nml.py 12.12s user 0.50s system 98% cpu 12.839 total
10:40
<
andythenorth >
this is a case where pypy3 is unusually slower
10:40
<
andythenorth >
I did also try the latest nightly, about the same
10:41
<
andythenorth >
I don't trust the results though, because chameleon builds these bytecode pre-compiled templates
10:42
<
andythenorth >
nah same result after I clear out those
10:43
<
andythenorth >
deps are chameleon and markdown, both installed fine from pip for me
10:43
<
andythenorth >
well I tend to look at the wins :)
10:44
<
andythenorth >
I just call different pythons from different parts of the makefile
10:44
<
andythenorth >
whichever is fastest for the job
10:46
<
andythenorth >
thanks :)
10:47
<
andythenorth >
I'm doing something chameleon isn't supposed to do :)
10:57
<
cfbolz >
andythenorth: hah, "supposed"
10:58
<
andythenorth >
I haven't asked chameleon devs, but I think generating 600 files from templates in 3s is probably beyond the intended use :)
10:59
<
andythenorth >
in website use, the requests don't usually come that fast, and would have varnish or something in front of them I guess
11:03
greedom has joined #pypy
11:23
slav0nic has joined #pypy
11:30
greedom has quit [Remote host closed the connection]
11:32
greedom has joined #pypy
13:26
jacob22 has quit [Ping timeout: 265 seconds]
13:52
greedom has quit [Remote host closed the connection]
14:44
otisolsen70 has quit [Quit: Leaving]
14:48
olliemath has joined #pypy
14:54
<
krono >
fascinating read that tells me to pick up openttd again
14:55
<
andythenorth >
ha good to hear :)
15:39
olliemath has quit [Quit: Client closed]
16:15
<
cfbolz >
I just made 3.x based pypy-cs smaller by a bit more than 1MB
16:40
greedom has joined #pypy
16:46
jacob22 has joined #pypy
18:40
Joannah has joined #pypy
18:44
Joannah has quit [Client Quit]
19:31
greedom has quit [Remote host closed the connection]
19:32
greedom has joined #pypy
19:46
greedom has quit []
19:48
greedom has joined #pypy
20:42
<
cfbolz >
nice, 5 new 3.9 files pass
21:17
greedom has quit []
23:33
andythenorth has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:47
slav0nic has quit [Ping timeout: 240 seconds]