Re: Speedup canvas itemconfigure -fill for many polygons.



On 31 Mar, 16:24, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On Mar 31, 1:59 pm, Mats <mats...@xxxxxxxxx> wrote:

Well, to answer this one I'd add a third hashtable
mapping (tag,item)->position-in-list. Granted, that
means additional housekeeping, but all operations then are O(1).

Do you think you can explain a bit more?
Can I create a hash entry with two keys, or do
I just combine them somehow to a single key?

Just combine. "$tag,$id" should do the job since ids contain only
digits (hence no comma). In Tcl pseudo-code:


As a TCL_STRING_KEYS

Mats
.



Relevant Pages

  • Re: Speedup canvas itemconfigure -fill for many polygons.
    ... means additional housekeeping, but all operations then are O. ... Can I create a hash entry with two keys, ... I just combine them somehow to a single key? ... concatenated in a string key. ...
    (comp.lang.tcl)
  • Re: Symbols garbage collector in Ruby1.9, fixed?
    ... The problem is that I could receive custom headers so for each one a ... It's fine as long as all the keys are fixed symbol ... Whilst you may have measured that "getting a Hash entry is 25% faster ... few applications have a specific acceptance criteria for CPU utilisation ...
    (comp.lang.ruby)
  • Re: Symbols garbage collector in Ruby1.9, fixed?
    ... The problem is that I could receive custom headers so for each one a ... It's fine as long as all the keys are fixed symbol ... Whilst you may have measured that "getting a Hash entry is 25% faster ... few applications have a specific acceptance criteria for CPU utilisation ...
    (comp.lang.ruby)
  • Re: padding scheme
    ... > It was my understanding that a hashing function gets its ... > collision-resistance from the entire hash entry. ... > truncating the hash function, then I'm taking away its one-wayness, ... > That gets me nothing but a stronger chance of finding identical keys. ...
    (sci.crypt)
  • Re: Why do people heckle?
    ... > For Dilkes, read Wilkes, throughout!> ... My W and D keys have somehow got transposed. ... Roy Stockdill ...
    (soc.genealogy.britain)