Program very slow to finish
Rainer Deyke
root at rainerdeyke.com
Mon Nov 5 21:32:05 EST 2001
More information about the Python-list mailing list
Mon Nov 5 21:32:05 EST 2001
- Previous message (by thread): Program very slow to finish
- Next message (by thread): Program very slow to finish
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Tim Peters" <tim.one at home.com> wrote in message news:mailman.1005002107.13101.python-list at python.org... > No, it was a good first approximation, but measurement speaks louder than > argument <wink>. I fiddled Python's dict dealloc routine like so: > > for (ep = mp->ma_table; fill > 0; ep++) { > if (ep->me_key) { > --fill; > //Py_DECREF(ep->me_key); > //Py_XDECREF(ep->me_value); > /* New code follows. */ > ep->me_key->ob_refcnt -= 1; > if (ep->me_value) > ep->me_value->ob_refcnt -= 1; > } > } > > This does everything the DECREF macros did *except* to call the platform > free() on the now-dead string-object keys. It also doesn't call the destroyed objects' destructors. -- Rainer Deyke (root at rainerdeyke.com) Shareware computer games - http://rainerdeyke.com "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
- Previous message (by thread): Program very slow to finish
- Next message (by thread): Program very slow to finish
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list