cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | hacking on TLS is fun, way more fun than arguing over petty shit, turns out
Darth has joined #pypy
Darth has quit [Quit: Ping timeout (120 seconds)]
otisolsen70 has joined #pypy
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #pypy
<mattip> cfbolz: the failure of lib-python.3.test.test_sys after adding "-X utf8" is consistent both yesterday and today
glyph has quit [Quit: End of line.]
glyph has joined #pypy
<cfbolz> mattip: that's because 3.7 hasn't been merged in yet I think?
<cfbolz> On 3.7 it's gone, no?
infernix has quit [Remote host closed the connection]
<mattip> yup, gone on 3.7 but still there on 3.8, even though 76c3c45c6258 was merged to 3.8
<cfbolz> :-(
<cfbolz> mattip: putting it on the todo, need to fix one major remaining problem with utf8 mode
otisolsen70 has quit [Quit: Leaving]
Atque has quit [Quit: ...]
infernix has joined #pypy
slav0nic has joined #pypy
<cfbolz> test_utf8_mode now passes locally on that branch
chosen has joined #pypy
<cfbolz> fijal: I was doing a bit of benchmarking, pypy definitely becomes faster than cpython at urllib3 http requests after a few dozens of them
<fijal> cfbolz: yep
chosen has quit [Quit: Leaving]
lritter has joined #pypy
Atque has joined #pypy
jacob22_ has joined #pypy
jacob22 has quit [Ping timeout: 240 seconds]
Atque has quit [Quit: ...]
Atque has joined #pypy
greedom has joined #pypy
lritter has quit [Quit: Leaving]
Guest96 has joined #pypy
<cfbolz> mattip: the 3.8 failures are even deeper into the rabbit hole
<cfbolz> I might leave them for a while
Pylon has joined #pypy
<Pylon> Hey, why isn't Pypy 3 accelerating Yt-dlp (Youtube-dl's active fork) faster than I expected?
<Pylon> It's almost taking 3 times longer for Youtube-dl to run with Pypy 3 compared to Python 3.7
<cfbolz> Pylon: isn't yt-dlp bandwidth-bound?
<Pylon> Not really for me as I have a decent internet speed and I am trying to accelerate the execution speed of getting video id + format and downloading thereafter
<cfbolz> Pylon: it's usually one video per process, right? not a lot of chance for the JIT to warm up
<cfbolz> pycryptodomex is likely not fast in pypy, it's in C
<cfbolz> at least parts
<Pylon> I checked and it at least takes me 3 to 5 seconds to start up yt-dlp with Python 3 and was hoping to accelerate & cut down the initialsation time. However, it's backfiring for me and it's taking 10 to 15 seconds depending on the video
Guest96 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Pylon> cfbolz: Yeah that's usually the case unless you are doing in batch from a txt file. Nevertheless, was hoping for JIT to speed up the run time
<Pylon> Oh are there other libraries/dependencies that are running in C? Wasn't expecting that as it said Pycryptomdomex was compatible with Pypy 3 on the Py pi page
<cfbolz> Pylon: I don't know, you would have to dig
<cfbolz> but pycryptodomex seems to have some C code
<cfbolz> (which is supported in pypy, but it tends to be slower than on CPython)
<Pylon> I see and would there be any pure python alternatives?
<Pylon> I was actually hoping for Pypy 3 to cut the overall runtime but I guess it's too much of a lofty ambition for now
<cfbolz> Pylon: if you have use a python alternative, then the JIT would have to be faster than C to beat CPython ;-)
<Pylon> At the moment, it takes around 6 seconds just for Yt-dlp to print it's first line with Pypy3 (vs 1 to 2 second for Python 3) and I was hoping for the overall time to take only 1 seconds lol
<cfbolz> yes, not without extra work, it seems
<cfbolz> Pylon: if you want to investigate, one thing I would try is to download 10 videos at once, and see whether the later download faster
<Corbin> Pylon: Where's it slow? IIRC youtube-dl emulates JS a bit, which is slow for irritating computer-science reasons (Python isn't designed for writing fast emulators, basically)
<Pylon> Yeah I hope that can be a thing that's actually possible and would mean switching out a lot of the libraries to native python versions, just to prove Pypy 3 can run Yt-dlp faster than Python 3.7
<Pylon> I am not sure exactly where but I can confirm right at the beginning is perhaps one of the worst performing areas
<Pylon> Initialisation of Yt-dlp alone already takes 6 seconds which proves the start up is slow to begin with here
<Pylon> Corbin: Just ascertained a 9 vs 19 seconds when downloading 3 videos format and printing them out
<Pylon> I can post the log if you wish to see
<Corbin> Pylon: I don't think that the log will help, unless they differ substantially. The typical approach here would be to "profile" the code while it's running; this gives us locations in youtube-dl's code where time is spent.
<Corbin> (I don't know the right way to profile Python code on PyPy 3 today, but hopefully somebody else does.)
Pylon has quit [Ping timeout: 256 seconds]
Guest96 has joined #pypy
Pylon has joined #pypy
<Pylon> Corbin: Yeah I would love to help and profile the code while running. It's worth it as you said the the log differs by a lot and doing some debugging might help
<Pylon> Not sure exactly how Pypy 3 works but can't it just run C code through it's JIT?
<Pylon> Or perhaps use the JIT for native Python code while using the C compiler (found in Python 3) for C codes when needed
Pylon has quit [Ping timeout: 256 seconds]
lritter has joined #pypy
greedom has quit [Remote host closed the connection]
slav0nic has quit [Ping timeout: 240 seconds]
lritter has quit [Quit: Leaving]
Guest96 has quit [Quit: Textual IRC Client: www.textualapp.com]