Joe Jevnik added the comment:
This was very exciting, I have never run gprof before; so just to make sure I
did this correctly, I will list my steps:
1. compile with the -pg flag set
1. run the test with ./python -m timeit ...
1. $ gprof python gmon.out > profile.out
Here is default:
E
Joe Jevnik added the comment:
I switched to the static tuple.
--
Added file: http://bugs.python.org/file39216/with-static-tuple.patch
___
Python tracker
<http://bugs.python.org/issue23
Joe Jevnik added the comment:
I don't think that I can cache the __call__ of the fget object because it might
be an instance of a heaptype, and if someone changed the __class__ of the
object in between calls to another heaptype that had a different __call__, you
would still get the __c
Joe Jevnik added the comment:
I am currently on a different machine so these numbers are not relative to the
others posted earlier.
* default
./python -m timeit -s "from collections import namedtuple as n;a = n('n', 'a b
c')(1, 2, 3)" "a.a"
100
Joe Jevnik added the comment:
I don't think that we need to worry about reusing the single argument tuple in
a recursive situation because we never need the value after we start the call.
We also just write our new value and then clean up with a NULL to make sure
that we don't blow
New submission from Joe Jevnik:
I was writing an extension module that was working with weakrefs and wanted to
ensure that the GC would not run for a block of code. I noticed that
gc.enable/gc.disable are not exposed to C and the state of the gc is in a
static variable so it cannot be mutated
Joe Jevnik added the comment:
I definitely could have used PyImport_Import and PyObject_Call to accomplish
this task; however, when I looked at at the implementation of these functions
it seemed like a lot of overhead and book keeping just to set a boolean. Since
I was already in a C
101 - 107 of 107 matches
Mail list logo