cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
kitties is now known as AOC
pmp-p has quit [Remote host closed the connection]
pmp-p has joined #pypy
AOC is now known as kitties
asmeurer has quit [Quit: asmeurer]
Dejan_ has joined #pypy
Dejan has quit [Ping timeout: 256 seconds]
lritter has quit [Quit: Leaving]
jcea has quit [Ping timeout: 260 seconds]
Dejan_ has quit [Ping timeout: 272 seconds]
Dejan has joined #pypy
mgedmin has quit [Quit: ZNC - https://wiki.znc.in/ZNC]
mgedmin has joined #pypy
isidentical has joined #pypy
yitz has joined #pypy
<yitz> # time pypy3 <<< 'import requests' does this take 2s for other folks, too?
<yitz> vs 0.3 in cython
proteusguy has quit [Remote host closed the connection]
proteusguy has joined #pypy
<mattip> I get about a 2x slowdown when using "pypy3.7 -c 'import requests" vs. "cpython3 -c "import reqeusts"
<mattip> which is what I would expect
<mattip> "pypy3.7 << 'import requests'" waits for EOF, so how are you running that?
vretiel has quit [Quit: WeeChat 3.0]
<yitz> EOF? The <<< sends in a string and closes STDIN
<yitz> I'm looking at an 8x slowdown
<yitz> Oh. Heh. You did <<
<yitz> << is a heredoc. <<< is a here-string. The <<EOF will redirect the block until a `EOF` on its own line. <<< is just a straight-up string.
<fijal> did you run it multipl times or just once?
<fijal> there might be a difference of availability of pyc files too
<fijal> (depending on the details how you run it and how it's installed)
<yitz> I ran it multiple times in a row
<yitz> It's possible there's no pyc being generated
<yitz> The module is not in a write-able path
<fijal> that is a very plausible explanation (loading py files takes longer than pyc)
otisolsen70 has joined #pypy
isidentical has quit [Read error: Connection reset by peer]
isidentical has joined #pypy
omasanori[m] has quit [Quit: Idle for 30+ days]
_whitelogger has joined #pypy
kitties is now known as ki||ies
ki||ies is now known as kitties
jcea has joined #pypy
<fijal> hm, why does pypy lack hashlib.HASH?
<fijal> what is it anyway, why is it not documented?
<mattip> neither does my CPython
<mattip> or do you mean _hashlib.HASH ?
<fijal> yes, _hashlib.HASH
<fijal> what is it even?
<fijal> like a base class?
<mattip> >>> h = hashlib.sha256(b'abc'); type(h)
<mattip> <class '_hashlib.HASH'>
<fijal> ah ok
<mattip> on PyPy it is <class '_hashlib.Hash'>
<fijal> pfff
<fijal> would you mind if I rename it?
<fijal> something broke because of that
<mattip> go for it, maybe it will fix a failing test or two
<mattip> hg grep "\<Hash\>" says it is only in lib_pypy/_hashlib/__init__.py (on py3.7)
<fijal> ok, I committed and pushed some stuff, think first commit since heptapod
isidentical has quit [Quit: isidentical]
<mattip> whohoo!
<fijal> I hope I didn't break anything
<mattip> we may only find out after a release since I don't think anything in our codebase cares
oberstet has quit [Quit: Leaving]
lritter has joined #pypy
isidentical has joined #pypy
otisolsen70_ has joined #pypy
otisolsen70 has quit [Ping timeout: 256 seconds]
otisolsen70_ has quit [Quit: Leaving]
otisolsen70 has joined #pypy
<cfbolz> heh, I have material for another "pypy is faster than C" flamebait blog post ;-)
<cfbolz> cpython3.8 has a math.isqrt function, which computes the square root of a potentially long integer
<cfbolz> it's all done using PyLongs, thus slow
<cfbolz> in pypy, we can write it in pure python, and the JIT will type-specialize to using C integers if the arguments is fast enough
<cfbolz> *small
yitz has left #pypy [#pypy]
isidentical has quit [Quit: isidentical]
<mattip> I started migrating the blogposts to pypy.org.
<mattip> It took much longer than I thought because I started to read some of them
<mattip> there is some good stuff there
<mattip> and jitviewer
otisolsen70 has quit [Ping timeout: 256 seconds]