These are chat archives for dropbox/pyston

30th
Apr 2015
Marius Wachtler
@undingen
Apr 30 2015 17:07
@tjhance Do you know what's missing for the 3arg eval() support?
Marius Wachtler
@undingen
Apr 30 2015 17:13
http://de.wikipedia.org/wiki/Daumen_dr%C3%BCcken#/media/File:Beide_Daumen_dr%C3%BCcken.jpg that you say it's only a matter of forwarding the local and global arguments to the existing eval implementation :-)
Travis Hance
@tjhance
Apr 30 2015 17:26
oh yeah it should be similar to exec
the rules might be slightly different though, I’m not sure
Marius Wachtler
@undingen
Apr 30 2015 17:32
k I will try it out.
Marius Wachtler
@undingen
Apr 30 2015 17:37
ok have to test it more but on the first sight it looks good at least i'm now passing several babel tests which before didn't work
Kevin Modzelewski
@kmod
Apr 30 2015 19:58
@undingen I was working on that too :P
I can go ahead and commit it
I was holding off since although we seem to have some support for sqlalchemy we're starting to have heap-size issues
(on the malloc heap, not our gc heap)
Marius Wachtler
@undingen
Apr 30 2015 20:00
oh ok, did you also encounter the copy.deepcopy issue with attrwrappers?
(it crashes)
Kevin Modzelewski
@kmod
Apr 30 2015 20:00
oh, no :/
Marius Wachtler
@undingen
Apr 30 2015 20:01
good then I didn't duplicate your work :-D
what kind of heap issues do we have?
size increases all the time?
Kevin Modzelewski
@kmod
Apr 30 2015 20:02
yeah it hits the 500MB limit we have set up
Marius Wachtler
@undingen
Apr 30 2015 20:02
oh wow
Kevin Modzelewski
@kmod
Apr 30 2015 20:02
on some pip test, for which CPython needs 100-200MB
~200MB of it is cached analysis results
but anyway, for now I'll just change the test to not run into it so that I can commit the eval stuff
Marius Wachtler
@undingen
Apr 30 2015 20:03
cool
other topic: I'm wondering if it would make sense to intern all dict keys strings and class and instance attributes strings. This is AFAIK what cpython does. and I expect that this should speed up attribute accesses.
I'm thinking about testing this out
Kevin Modzelewski
@kmod
Apr 30 2015 20:06
even if you do something like setattr(obj, 'attr_%d' % foo(), 0)?
Marius Wachtler
@undingen
Apr 30 2015 20:07
not totally sure but PyObject_SetAttr and PyObject_SetAttrString contain a PyString_InternInPlace
Kevin Modzelewski
@kmod
Apr 30 2015 20:08
oh interesting
sounds reasonable :)
Marius Wachtler
@undingen
Apr 30 2015 20:09
ok I'm going to try it out on the weekend
   PyString_InternInPlace(&name);
    if (tp->tp_setattro != NULL) {
        err = (*tp->tp_setattro)(v, name, value);
        Py_DECREF(name);
        return err;
    }
    if (tp->tp_setattr != NULL) {
        err = (*tp->tp_setattr)(v, PyString_AS_STRING(name), value);
        Py_DECREF(name);
        return err;
    }
Michael Arntzenius
@rntz
Apr 30 2015 20:33
woah
libunwind calls setcontext() in order to resume after unwinding, and setcontext() performs a system call (sigprocmask). so we're doing a syscall for every exception handler, finally-block, or function-with-RAII-destructors we unwind through
Michael Arntzenius
@rntz
Apr 30 2015 20:41
it does not appear that the C++ unwinder is doing this. and yet my custom unwinder is still faster (on microbenchmarks) than the C++ unwinder. that's really surprising.
Marius Wachtler
@undingen
Apr 30 2015 20:45
:-).
Were you able to overload the C++ unwind methods or do we have to patch directly the implementation inside the compiler runtime?
Michael Arntzenius
@rntz
Apr 30 2015 20:45
nah, I just overloaded __cxa_throw and friends
Marius Wachtler
@undingen
Apr 30 2015 20:46
:-)
Marius Wachtler
@undingen
Apr 30 2015 21:08
@kmod btw: the new 3d printer works great! even after days of tweaking the old one the result was not as good as the first print with the new one. it's much more rigid and accurate and I'm comfortable with letting it print without constantly standing next to it with a fire extinguisher :-D
Kevin Modzelewski
@kmod
Apr 30 2015 21:09
that's awesome!
you should post pictures when you have something :)
I haven't touched mine in a while...
@dagar I think the cmake config.h stuff isn't quite working...
Marius Wachtler
@undingen
Apr 30 2015 21:09
we need a pyston mascot
Kevin Modzelewski
@kmod
Apr 30 2015 21:09
it just ends up with #define SIZEOF_BOXEDDICT (no value)
could you take a look, and also change it to measure sizeof(std::unordered_map<void*, void*>)?
ooh yeah pyston logo + mascot
Daniel Agar
@dagar
Apr 30 2015 21:11
that's easier
Kevin Modzelewski
@kmod
Apr 30 2015 21:12
if we can think of some logo/mascot ideas we can get a designer at Dropbox to whip something up :P
Marius Wachtler
@undingen
Apr 30 2015 21:14
:+1:
Michael Arntzenius
@rntz
Apr 30 2015 21:14
hm, is there a good way to have a thread-local timer?
I could just have a static thread_local Timer foo("name");, but then (for example) it errors if I try to restart it because it gets started when the thread starts
I guess I could add a constructor for Timer that doesn't actually start the timer
Chris Toshok
@toshok
Apr 30 2015 21:29
You should be able to end/restart it, or call split