yuyichao_ has quit [Ping timeout: 255 seconds]
yuyichao_ has joined #pypy
asmeurer_ has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jcea has quit [Quit: jcea]
ArneBab has joined #pypy
ArneBab_ has quit [Ping timeout: 252 seconds]
asmeurer_ has joined #pypy
tbodt has joined #pypy
tilgovi has joined #pypy
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
asmeurer_ has quit [Quit: asmeurer_]
tilgovi has quit [Ping timeout: 255 seconds]
lritter has quit [Ping timeout: 240 seconds]
asmeurer__ has joined #pypy
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
agates has quit [Ping timeout: 255 seconds]
danchr_ has joined #pypy
danchr has quit [Ping timeout: 240 seconds]
danchr_ is now known as danchr
dpn` has quit [Ping timeout: 240 seconds]
dpn` has joined #pypy
asmeurer__ has quit [Quit: asmeurer__]
agates has joined #pypy
jamesaxl has joined #pypy
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whitewolf has quit [Quit: ZNC - http://znc.in]
whitewolf has joined #pypy
ronan has quit [Ping timeout: 255 seconds]
dan- has quit [Ping timeout: 260 seconds]
yuyichao has joined #pypy
yuyichao_ has quit [Ping timeout: 260 seconds]
yuyichao has quit [Quit: Konversation terminated!]
yuyichao has joined #pypy
ronan has joined #pypy
DragonSA has joined #pypy
dan- has joined #pypy
dan- has joined #pypy
dan- has quit [Changing host]
jamadden has quit [Quit: Leaving.]
amaury has joined #pypy
ssbr has joined #pypy
DragonSA has quit [Ping timeout: 260 seconds]
gumblex_ has joined #pypy
gumblex has quit [Ping timeout: 240 seconds]
gumblex_ is now known as gumblex
realitix has joined #pypy
asmeurer_ has joined #pypy
asmeurer_ has quit [Client Quit]
asmeurer_ has joined #pypy
arigato has joined #pypy
asmeurer_ has quit [Client Quit]
<kenaan_> amauryfa py3.5 785e75435a92 /pypy/interpreter/astcompiler/symtable.py: Attempt to fix 'nonlocal' in class scopes. test_scope and test_super are passing again.
oberstet has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
amaury has quit [Ping timeout: 268 seconds]
antocuni_ has joined #pypy
antocuni_ is now known as antocuni
adamholmberg has quit [Ping timeout: 260 seconds]
marr has joined #pypy
amaury has joined #pypy
vkirilichev has joined #pypy
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-jit-macosx-x86-64/builds/2970 [danchr: try to build py3.5 on OS X, py3.5]
<bbot2_> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-macosx-x86-64/builds/2970 [danchr: try to build py3.5 on OS X, py3.5]
amaury has quit [Quit: Konversation terminated!]
antocuni has quit [Ping timeout: 258 seconds]
FASDFSF has joined #pypy
girish946 has joined #pypy
girish946 has quit [Max SendQ exceeded]
girish946 has joined #pypy
jcea has joined #pypy
runciter has quit [Ping timeout: 240 seconds]
<haypo> arigato, fijal, LarstiQ : hi. i started to do what you asked me to do :) analyze *manually* PyPy perf by looking at data: http://haypo-notes.readthedocs.io/pypy_warmups.html
<haypo> as expected, a few benchmarks have multiple "steps": warmup, step 2, step 3, like float
<haypo> to limit the total benchmark runtime, i chose to only compute to something like 50 values per run, and limit warmup to less than 100
<haypo> it seems commonly that if you wait longer, you get even better performance, but it would take longer than 1 day to run all benchmarks...
antocuni has joined #pypy
<LarstiQ> haypo: nice
<haypo> oh, and cfbolz ^^ ;-)
<LarstiQ> haypo: (every time) I need to lookup what loops/values/warmup means in your terminology, maybe good to have a short explanation of that?
<LarstiQ> and if you'd want to publish this I'd insist on labeling the graphs ;)
<LarstiQ> nice bug in genshi_text
<LarstiQ> antocuni: you might also be interested
<haypo> LarstiQ: warmups is number of ignored values, samples is the number of computed values
<haypo> LarstiQ: in each worker process
<LarstiQ> that's a bit abstract
<LarstiQ> haypo: but I like the way this is going!
<haypo> LarstiQ: how do you call these numbers?
<haypo> oh, wait, "samples" must be written "values"
<LarstiQ> haypo: I guess the main struggle is "values", what is a value? The amount of time to do "one instance of benchmark run"?
<haypo> LarstiQ: "value" is the wall-clock time elapsed when you run: for _ in range(loops): func()
<haypo> the term is very generic since in perf, you can handle different kinds of values. it can be the memory usage for example, or any kind of data in fact
girish946 has quit [Quit: Leaving]
Rhy0lite has joined #pypy
<antocuni> haypo: nice work, but I don't agree with this: "if performance has a cycle (usually with a spike at the start or end): compute 5 cycles to use the average of a cycle"
<danchr> yay; I successfully translated the py3.5 branch on my Mac!
<antocuni> haypo: ah wait, maybe I misunderstood :)
<haypo> antocuni: it's only a proposal
<antocuni> at first I understood that you wanted to take the average of 5 subsequent runs
<haypo> antocuni: http://haypo-notes.readthedocs.io/_images/chaos_cycle.png there is a cycle of 5 values. i chose to compute 25 values here
<antocuni> but actually, you want to take the average of 5 full cycles
<antocuni> haypo: yeah ok, this makes more sense
<antocuni> sorry for the confusion :)
<haypo> antocuni: ah yes, perf computes 25 values x N runs, and then compute the mean and std dev of all values together
<antocuni> however, note that the length of the cycle probably changes if you change the amount of RAM available, or if you play with the various PYPY_GC_* env variables
<haypo> in the analysis, i used 10 runs. it's hard to choose the number of runs, since they are variation between each run
<haypo> good example of that: http://haypo-notes.readthedocs.io/_images/go_warmup.png 1 run was much faster than the 9 other runs
<antocuni> this is probably caused by ASLR?
<haypo> antocuni: the goal is well defined :-) it's to choose the number of warmups & samples for one specific PyPy version on one specific hardware
<antocuni> ok perfect, I missed the "specific hardware" point
<antocuni> then yes, I think that what you propose should work well
<haypo> antocuni: no idea. to be honest, i don't want to try to find why :-) i prefer to solve problems one by one :-)
<haypo> antocuni: for the long term, i would like to design an algorithm to compute these numbers
<haypo> antocuni: i spent one week on trying to write such algorithm, and i failed completely :-)
<haypo> the problem is that i'm not sure of what i am looking for :)
<haypo> it's hard to design an algorithm if you don't know the expect result :-D
<antocuni> yeah, I agree and understand the frustration. I also have the same problem when I want to benchmark my own code
<haypo> antocuni: my starting point was arigato idea of computing 3N values, consider that the first sample (0..N) is the warmup, and compare the mean of two samples (N..2N and 2N..3N)
<haypo> antocuni: but depending on N, you compute something very different
<haypo> i began to compute "moving average"... but again, the size of the window is hard to "choose"
<haypo> and choose I use average? median? remove outliers? compute Q1/Q3? std dev?
<antocuni> well, in general the performance characteristic of a PyPy benchmark cannot be expressed by only one or two numbers; so, you are doomed anyway :).
<haypo> antocuni: x_x
<danchr> are changes like these two <https://bitbucket.org/danchr/pypy/commits/all?search=draft()> safe enough to push directly, or should I go through a custom branch & pull request?
inhahe_ has quit [Read error: Connection reset by peer]
inhahe_ has joined #pypy
mattip has joined #pypy
<mattip> danchr: the danger is confirming that you didn't break other posix platforms, linux64, arm ...
<mattip> so it would be best to either verify that or if you can't, push the branch and kick some buildbots
<mattip> before merging to default
<danchr> ah, okay
lritter has joined #pypy
<danchr> I'm currently translating on Linux; we'll see how that goes
<danchr> mattip: is there a way to run the tests so that I can verify I didn't break anything?
yuyichao has quit [Ping timeout: 258 seconds]
<kenaan_> danchr py3.5-mac-translate 4e08bb45b11b /rpython/rlib/rposix.py: Add checks for posix_fadvise() and posix_fallocate() macOS Sierra does not define these, and CPython ...
<kenaan_> danchr py3.5-mac-translate b66e14493a7b /pypy/module/_posixsubprocess/interp_subprocess.py: Add check for HAVE_DIRENT_H _posixsubprocess.c uses this symbol to optionally include the header, but...
<mattip> danchr: you can run 'python pytest.py rpython/rlib/test/pos*.py'
<mattip> when pwd is the top-level pypy directory
<mattip> and likewise for module/_posix/test
<mattip> and likewise for pypy/module/_posix/test
<mattip> note here "python" is cpython 2.7
<danchr> the tests don't work in pypy?
<mattip> the test harness works by translating small pieces of rpython or larger pieces of pypy, and then running the actual test
<mattip> using pypy as the translating platform sometimes gets the harness confused
arigato has quit [Quit: Leaving]
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-jit-macosx-x86-64/builds/2971 [danchr: try my branch, py3.5-mac-translate]
yuyichao has joined #pypy
Tiberium has joined #pypy
adamholmberg has joined #pypy
<danchr> mattip: which build is best for testing linux?
<mattip> I guess the linux64, both own-linux-x86-64 and pypy-c-jit-linux-x86-64
<bbot2_> Started: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5870 [danchr: try my branch, py3.5-mac-translate]
<bbot2_> Started: http://buildbot.pypy.org/builders/pypy-c-lib-python-linux-x86-64/builds/52 [danchr: try my branch, py3.5-mac-translate]
<mattip> danchr: thanks!
<danchr> eh?
<LarstiQ> danchr: for the work done on py3.5-mac-translate I'd guess :)
<danchr> oh, np :)
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
runciter has joined #pypy
vkirilic_ has joined #pypy
vkirilichev has quit [Ping timeout: 255 seconds]
adamholmberg has quit [Ping timeout: 260 seconds]
jamesaxl has quit [Quit: WeeChat 1.7]
FASDFSF has quit [Read error: Connection reset by peer]
girish946 has joined #pypy
amaury has joined #pypy
<danchr> I think os.sendfile() is implemented incorrectly in PyPy, even on Linux; AFAICT it should return the content of the offset pointer, rather than the 0-for-success returned by sendfile()
<bbot2_> Failure: http://buildbot.pypy.org/builders/pypy-c-lib-python-linux-x86-64/builds/52 [danchr: try my branch, py3.5-mac-translate]
girish946 has quit [Quit: Leaving]
<haypo> danchr: on CPython/Linux, it seems like os.sendfile() returns the result of the C sendfile() function
<danchr> indeed; that seems like a bug
<danchr> (unless the manual page is wrong…)
<haypo> LarstiQ: "larstiQ> nice bug in genshi_text" any idea where the bug comes from? CPython doesn't slow down like that, file:////home/haypo/prog/GIT/haypo_notes/build/html/pypy_warmups.html#genshi-text-loops-8-bug
<LarstiQ> haypo: no, I'm not an actual pypy developer ;)
<haypo> LarstiQ: me neither
<LarstiQ> haypo: if I'd guess (quite wild) it might be combinatorial explosion of codepaths that need to be jitted
<LarstiQ> cfbolz/arigato/fijal would be better at giving a real answer
Tiberium has quit [Remote host closed the connection]
Tiberium has joined #pypy
<bbot2_> Failure: http://buildbot.pypy.org/builders/own-linux-x86-64/builds/5870 [danchr: try my branch, py3.5-mac-translate]
<danchr> hmm, seems like my branch fails approximately as much as the previous builds do :/
<danchr> (translation seems quite slow on the mac builder; it takes ~30min on my Mac)
<mattip> danchr: there is one additional failure, pypy.module.posix.test.test_posix2
<mattip> which uses posix_fadvise
<mattip> so that should be fixed before merging
<danchr> yeah, see it
arigato has joined #pypy
adamholmberg has joined #pypy
<danchr> hmm, the test passes on my linux vm…
vkirilic_ has quit [Remote host closed the connection]
forgottenone has joined #pypy
vkirilichev has joined #pypy
vkirilichev has quit [Ping timeout: 268 seconds]
<arigato> danchr: the C sendfile() doesn't return 0 for success (on Linux); afaict os.sendfile() returns the result of the C sendfile() both on CPython and on pypy3
<arigato> if I'm wrong, you need to be more specific
<danchr> arigato: you're right, I was misled by an Ubuntu package that contained the freebsd manpage
<danchr> …and which I happened to have installed
hjax has joined #pypy
hjax is now known as Guest24289
<antocuni> pypy quiz of the day: if you run this code: http://paste.openstack.org/show/607030/
<antocuni> and plot the results, you can see that after the 250th iteration, the performance drops. However, the loop inside "bench" has already been compiled and thus no more JIT compilation is needed
<antocuni> so, why does it happen? It took me half a day to get it :)
<arigato> so, why?
<antocuni> it's because 'import pypyjit' modifies the global namespace
<antocuni> so the guard for looking up 'ord' fails
<antocuni> if you either import pypyjit at toplevel, or capture ord as an argument of bench(), it works as expected
<arigato> uh
<arigato> but modules should have dicts that are not subjected to that issue?
jamesaxl has joined #pypy
<arigato> maybe that's precisely not a module-dict, because that's in __main__?
<antocuni> arigato: well, they have dicts which generate out of line guards (IIRC), so the code is invalidated
<antocuni> or, at least, this is what I supposed. But indeed, I can't find the guard in the generated code
<arigato> right, same problem if we put that code in x.py and run it with "import x"
<arigato> I guess it's solvable: when we do a global lookup that ends up as a built-in we'd create and store a NULL entry in the global dict
<arigato> an empty MutableCell object
<antocuni> note that in the original problem I was debugging, there was no "ord" but "unpack" (from struct import unpack)
<antocuni> so creating the cell only for builtins would not help in that case (but maybe it's still a good idea)
<arigato> ah
* arigato tries to make "ord" a global
<arigato> indeed, same problem
<arigato> basically adding a new global invalidates pretty much all the code in the module, e.g. functions calling other functions or reading any imported attribute or built-in
<antocuni> yes
<antocuni> and I fear it is kind of common to have imports inside functions
<arigato> no, this case works
<antocuni> how?
<arigato> because the import doesn't add new *globals*
<antocuni> aaah, true
<arigato> maybe we could arrange for the quasi-immutable guards to fire only for a specific name, somehow, instead of for any change to the "structure" of the dict (which means, any change to the dict minus the globals that are MutableCells)
<arigato> right now the class ModuleDictStrategy has simply: _immutable_fields_ = ["version?"]
<antocuni> yeah, I was also thinking of something along those lines. Not sure how easy it is though, because it means that somewhere we need to keep a parallel dict which maps key->guard to invalidate
<arigato> and changes the version
<arigato> of course this migth all work automatically if we ever finish guard_compatible...
<antocuni> does it?
<arigato> the guard_compatible would fail in the "lightweight" mode, but figure out that the guarded elidable function still returns the same thing, and so they would allow execution to continue on trace
adamholmberg has quit [Remote host closed the connection]
* arigato off
arigato has quit [Quit: Leaving]
asmeurer_ has joined #pypy
asmeurer_ has quit [Client Quit]
realitix has quit [Quit: Leaving]
antocuni has quit [Ping timeout: 260 seconds]
<kenaan_> rlamy PyBuffer 3b48e100aaba /pypy/module/cpyext/test/test_memoryobject.py: fix test
vkirilichev has joined #pypy
vkirilichev has quit [Remote host closed the connection]
vkirilichev has joined #pypy
vkirilichev has quit [Ping timeout: 252 seconds]
oberstet has quit [Ping timeout: 255 seconds]
amaury_ has joined #pypy
amaury has quit [Ping timeout: 255 seconds]
Tiberium has quit [Remote host closed the connection]
Tiberium has joined #pypy
kipras`away is now known as kipras
amaury has joined #pypy
amaury_ has quit [Ping timeout: 240 seconds]
<bbot2_> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-macosx-x86-64/builds/2971 [danchr: try my branch, py3.5-mac-translate]
amaury_ has joined #pypy
arigato has joined #pypy
<arigato> snow, snow!
<nanonyme> Again? :(
amaury has quit [Ping timeout: 268 seconds]
<bremner> yep, time to get those winter tires on, winter will be here soon.
<arigato> :-)
<nanonyme> Bleh, we've had snow since about November, we still occasionally get snow in April. I'm just waiting for Spring to start at some point
<dash> nanonyme: send some down here, we're ready for ice cream
<mattip> danchr: I don't see how 4e08bb45b11b could have caused the test failure, and when I run the tests they pass
<mattip> is anyone around with access to bencher4, and can rerun this test?
<mattip> on the py3.5-mac-translate branch
* arigato does
<arigato> yes, it fails
<arigato> posix.posix_fadvise() returns 22
<arigato> instead of 0
<danchr> does it also fail in py3.5?
<mattip> 22 is EINVAL
<arigato> it may be because bencher4 is an older linux
<arigato> not according to the man page, strange
<mattip> but it passed on bencher4 with py3.5, danchr just moved things around
<danchr> which distro is bencher4? I could try to reproduce
Rhy0lite has quit [Quit: Leaving]
<mattip> nvrmind, my bad, it fails on bencher 4 on py3.5 too
<mattip> excatly the same
gbutnaru has quit [Ping timeout: 255 seconds]
<arigato> indeed
<arigato> :-)
amaury_ has quit [Quit: Konversation terminated!]
gbutnaru has joined #pypy
<mattip> sorry, anyway the pull request looks good to me
amaury_ has joined #pypy
tbodt has joined #pypy
oberstet has joined #pypy
kipras is now known as kipras`away
Guest24289 has quit [Quit: Leaving]
Tiberium has quit [Remote host closed the connection]
jaysonsantos has left #pypy ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<kenaan_> mattip py3.5 3e391513b23c /pypy/doc/whatsnew-pypy3-head.rst: document branch
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
nimaje has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
vkirilichev has joined #pypy
marky1991 has quit [Ping timeout: 240 seconds]
arigato has quit [Quit: Leaving]
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattip has left #pypy ["bye"]
arigato has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
forgottenone has quit [Ping timeout: 268 seconds]
tbodt has joined #pypy
rowillia has joined #pypy
oberstet has quit [Ping timeout: 255 seconds]
antocuni has joined #pypy
arigato has quit [Quit: Leaving]
asmeurer__ has joined #pypy
<kenaan_> amauryfa py3.5 77139bab65b2 /pypy/module/_io/: CPython Issue #21057: TextIOWrapper now allows the underlying binary stream's read() or read1() method to return a...
<kenaan_> amauryfa py3.5 af84269c028b /pypy/module/_io/: Python Issue #21310: Fixed possible resource leak in failed open()
<kenaan_> amauryfa py3.5 0f983f4075de /pypy/module/_io/: Chain exceptions when close() contains multiple operations that can fail.
<kenaan_> amauryfa py3.5 15ee4ffa4842 /pypy/module/_io/: CPython Issue #21396: write_through=True doesn't force a flush() on the underlying binary buffered object.
<kenaan_> amauryfa py3.5 32c611c850d8 /pypy/module/_io/: CPython Issue #22982: Improve BOM handling when seeking to multiple positions of a writable text file.
<kenaan_> amauryfa py3.5 7ce52a9f8d1f /rpython/rlib/: Add support for rejecting lone surrogates in utf16 and utf32 decoders.
amaury_ has quit [Ping timeout: 255 seconds]
<rowillia> Howdy! Thanks for the fix this week for ctypes + rtree! I'm investigating pushing for PyPy at my company (a major US startup) and one of the first questions I've been asked is who else uses PyPy. I don't really have any examples beyond Ben Bangart's talk https://www.youtube.com/watch?v=_F2peRzJzhU . Is there a list of PyPy users or cases studies anywhere?
marr has quit [Ping timeout: 260 seconds]
antocuni has quit [Ping timeout: 240 seconds]
asmeurer__ has quit [Quit: asmeurer__]