On 18.06.2012 23:08, Steven D'Aprano wrote:
> Raymond Hettinger wrote:
> 
>> Sorry I can make a more detailed post right now.  I'll make time in
>> the next couple of weeks to post some code and timings that
>> document the collision counts, total memory size, and its affect
>> on various dict use cases.
> 
> 
> Is there some way to instrument dictionary sparseness, number of hits
> and misses, etc. from Python?
> 
> A secret command-line switch, perhaps, or a compile-time option?

Not that I know of, no.

> And if there isn't, perhaps there should be.

If so, only compile time options could be acceptable. However,
in my experience with profiling, the specific statistics that you
want to obtain are rarely known in advance, so you have to write
specific instrumentation every time you want to do an experiment -
and then the instrumentation is only good for that single experiment.

Thus, nobody publishes the instrumentation, since it would accumulate
as clutter.

Regards,
Martin

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to