arigato 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 | mac OS and Fedora are not Windows
lritter has quit [Ping timeout: 246 seconds]
ronan has quit [Ping timeout: 258 seconds]
ronan has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
PileOfDirt has quit [Remote host closed the connection]
ronan has quit [Ping timeout: 258 seconds]
ronan has joined #pypy
adamholmberg has joined #pypy
jcea has quit [Quit: jcea]
adamholmberg has quit [Remote host closed the connection]
jacob22_ has joined #pypy
jacob22 has quit [Ping timeout: 268 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 246 seconds]
forgottenone has joined #pypy
dddddd has quit [Remote host closed the connection]
bugus has joined #pypy
bugus has quit [Ping timeout: 256 seconds]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
oberstet has joined #pypy
petronny has joined #pypy
[Arfrever] has quit [Ping timeout: 250 seconds]
[Arfrever] has joined #pypy
[Arfrever] has quit [Ping timeout: 245 seconds]
[Arfrever] has joined #pypy
dustinm has quit [Quit: Leaving]
dustinm has joined #pypy
_whitelogger has joined #pypy
_whitelogger has joined #pypy
_whitelogger has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
_whitelogger has joined #pypy
_whitelogger has joined #pypy
_whitelogger has joined #pypy
antocuni has joined #pypy
dddddd has joined #pypy
ronan has quit [Ping timeout: 257 seconds]
ronan has joined #pypy
fryguybo1 has joined #pypy
fryguybob has quit [Ping timeout: 245 seconds]
lritter has joined #pypy
antocuni has quit [Ping timeout: 268 seconds]
tsaka__ has quit [Quit: Konversation terminated!]
jcea has joined #pypy
ronan has quit [Ping timeout: 276 seconds]
ronan has joined #pypy
ronan has quit [Ping timeout: 264 seconds]
ronan has joined #pypy
adamholmberg has joined #pypy
jacob22_ has quit [Ping timeout: 258 seconds]
tsaka__ has joined #pypy
antocuni has joined #pypy
antocuni has quit [Remote host closed the connection]
antocuni has joined #pypy
<kenaan> mattip semlock-deadlock 7c3fc68b2a9e /pypy/doc/whatsnew-head.rst: document, close branch to be merged
<kenaan> mattip default 6187f28f2baf /pypy/: fix semaphore deadlock in issue 2953
<kenaan> mattip py3.6 777ad5f524c1 /pypy/: merge default into py3.6
<kenaan> mattip py3.6 60d99c821291 /pypy/module/_multiprocessing/test/test_semaphore.py: fix test for python3
ronan has quit [Ping timeout: 258 seconds]
ronan has joined #pypy
jacob22 has joined #pypy
<lritter> i'm looking to augment the LLVM backend for my partially JITed language because compile perf is *awful*, and it occurred to me that folks here might have some experience with different backends.
<lritter> the alternatives i'm seriously considering atm are libjit, libgccjit or libtcc. what i don't know is which one has the best bang for buck i.e. outperforms LLVM in compile speed, while still providing a reasonable amount of execution performance
<lritter> libtcc currently looks the most enticing... it's not fairly fast, but iirc it compiles quickly, but also quite importantly, in a pinch it could replace the clang C bridge that we use
<simpson> lritter: It seems like you're looking at a very flexible range of choices; have you seen QBE, by chance? It's another LLVM-but-smaller library: https://c9x.me/compile/
<lritter> libgccjit could perhaps even act as a permanent replacement, but gcc itself is still GPL and that's going to be a problem w. shipping
<lritter> simpson, yes i did. tbh the API just made me go ???
<lritter> i also looked at libfirm, same.
<lritter> but QBE is the most liberally licensed option which definitely is a plus.
<simpson> BTW, there's a thesis recently going around that only a small handful of transformations are necessary to get an 80/20 tradeoff in optimizers. It could be that you only need those optimizations during JIT; certainly ISTM that this list is precisely the list that RPython uses.
marky1991 has joined #pypy
<lritter> the jit is mostly needed to produce AST and syntax transform functions, actual program code is supposed to be compiled with big boy pants ;)
<simpson> The paper's https://www.clear.rice.edu/comp512/Lectures/Papers/1971-allen-catalog.pdf but the short list is: inlining, loop unrolling, (LI)CM, DCE, CSE, constant folding, strength reduction/instruction selection, register coloring.
<lritter> is that paper for an implementation or...
<simpson> That's the 1971 paper cataloguing these optimizations. https://rpython.readthedocs.io/en/latest/jit/optimizer.html is a very similar-looking list.
<lritter> we currently have 1.2s of startup time which is spent 90% in llvm... a lot of it is code that is executed once then thrown away
<lritter> if i can't solve this with middleware i won't.
<simpson> Have you checked which LLVM passes are being used? ISTR that by default they select passes that are heavy, aimed at C++.
<lritter> simpson, it's definitely -O0. i've done there everything i could.
<lritter> 1.2s without any optimizations, 1.7s with.
<lritter> i think what it comes down to is deciding in which order i'm going to write & test backends :|
<lritter> starting with libtcc would have the most benefit as having a C backend is never bad
<lritter> plus if it's already good enough i might even use it for the C bridge.
<lritter> what also matters is the kind of output you get when you break in GDB. LLVM is pretty good in that regard.
<lritter> but if that fails, what to try next? QBE doesn't really look like it does online compilation well.
<lritter> libjit is smaller than libgccjit and has the better license so i'd try that i guess
<simpson> I bet that QBE's author would support adding part of the online API, but they might ask you to provide the JIT bits and write some C.
<simpson> They're targeting BSDs IIUC, where JIT memory needs brush up against the system security policy.
<lritter> ok, so tcc's GDB support at runtime is non-existent. it does work offline though.
marky1991 has quit [Ping timeout: 246 seconds]
mattip has joined #pypy
Garen_ has joined #pypy
Garen has quit [Ping timeout: 255 seconds]
<arigato> mattip: re issue #3011 (cpyext slow when calling Py_BuildValue)
<mattip> ?
<arigato> I think that we could build and fill tuples entirely from C, the same way as we do that with PyIntObjects
<arigato> unless I'm mistaken, C code calling PyInt_FromLong() gets a PyIntObject made from C which doesn't have any corresponding pypy side at first (or possibly ever)
<arigato> doing that with tuples seems possible now that PyTupleObjects maintain their own list of "PyObject *" pointers too
<arigato> ah, but note that PyTuple_SET_ITEM is already just a macro in C
<arigato> I guess PyTuple_New() still needs to be turned into a C-allocation-only, and then care taken in tupleobject.py
<mattip> right. On py3.6 we still need to improve PyLong_FromLong like PyInt_FromLong, that might e the difference between the benchmark there
<mattip> nice
<mattip> so one by one allow C obj creation from C without a w_obj until needed
oberstet has quit [Remote host closed the connection]
<antocuni> note that we still need to solve the general case of creating objects in C and returning them to Python (e.g. ndarray.getitem returning a scalar)
<mattip> antocuni: you mean the getitem benchmark in bench_np.py (0.06 in cpython2.7, 0.41 in pypy2.7)?
<mattip> I didn't look at the kcachegrind for that, is there a hot spot, or is it more of too much cpyext?
<antocuni> yes
<antocuni> IIRC we looked at it during the last leysin sprint
<mattip> I imagine the same tuple creation in do_mktuple happens there too from ParseArgs
<antocuni> mattip: look at extradoc/planning/cpyext.txt
<antocuni> "Improving the performance of PyObject* -> W_Root conversion"
<antocuni> looking at what I wrote there, this problem is currently shown also by allocate_int and allocate_tuple
<mattip> allocate_int is 3 times slower, where allocate_tuple is 9-15x slower, so we probably need to to both
* mattip will try to think about the plan in the doc
<mattip> it needs some experimentation
<mattip> to see what helps
<antocuni> yes sure, I think they are two different optimizations
<antocuni> my personal plan was to work on it during the cpyext sprint which is not going to happen :(
<antocuni> (well, maybe we should do it anyway)
<mattip> it's always fun to meet up
<antocuni> +1
Guest42 has joined #pypy
<mattip> ahh, PyLongObject, PyListObject, PyMethodObject are special: they have no lltype struct
<mattip> so creating them in C only is a largish change
<mattip> and PyTuple_New is already in C, but maybe it calls non-pure C functions
* mattip off, bbl
mattip has quit [Quit: Leaving]
dmalcolm has quit [Remote host closed the connection]
dmalcolm has joined #pypy
ronan has quit [Read error: Connection reset by peer]
ronan has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<kenaan> antocuni pyrepl ee97ef7ab45d /pyrepl/readline.py: remove trailing whitespace
antocuni has quit [Ping timeout: 246 seconds]
forgottenone has quit [Quit: Konversation terminated!]
marky1991 has joined #pypy
nunatak has joined #pypy
Guest42 has quit [Remote host closed the connection]
marky1991 has quit [Ping timeout: 258 seconds]
Kipras_ has joined #pypy
Kipras_ has quit [Ping timeout: 244 seconds]
Kipras_ has joined #pypy
nunatak has quit [Quit: Leaving]
dante has joined #pypy
marky1991 has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
dansan has joined #pypy
<dansan> Hello. Does anybody know where Nuitka is discussed in IRC?
forgottenone has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
Guest5231 has quit [Quit: ZNC - https://znc.in]
marky1991 has quit [Ping timeout: 246 seconds]
nopf_ has quit [Quit: leaving]
jacob22 has quit [Remote host closed the connection]
jacob22 has joined #pypy
lritter has quit [Ping timeout: 245 seconds]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
mattip has joined #pypy
<mattip> dansan: Nuitka support https://nuitka.net/pages/support.html
<mattip> they have gitter and mail
adamholmberg has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Ping timeout: 250 seconds]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
speeder39_ has joined #pypy