> I.e., if you want C speed, you need to write C-like static code and use 
> more static algorithms. There's no way around that (except for a macro 
> facility, which we don't have).

Per the advice on comp.lang.python, I disabled GC pre-pickle and then
re-enabled it post-pickle. It turned something that was O(n^2) into O(n)
and cut down my run times from 1000s to 80s. 

The people said: 


> I'm somewhat shocked -- is the occasionally-abysmal behavior of the
> GC documented anywhere?

"I don't think so.  It's somewhat of an FAQ on the list, though.  The
question tends to arise when someone tries to construct a large list
of non-trivial objects, which takes quadratic time because object
allocation regularly triggers GC, which traverses the growing list."

        
                        ...Eric

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to