in reply to Re: Better algorithm or data structure?
in thread Better algorithm or data structure?

Oh, fudge.   If you think the above posting is brilliant, then, “it came from me.”   If not, “I have no idea who just said that.”

:-D

As you can see, the Interested Parties simply want to know when the state of a Work Item has changed, and they decide what (if anything...) to do in response to that occurrence.

The “unique IDs,” which can simply be consecutive arbitrary integers, simply serve as hash-keys.

There are endless variations on this idea, but I think you get the idea.   And it will produce “orders of magnitude” speed improvements provided that virtual-memory thrashing is not an issue.

Replies are listed 'Best First'.
Re^3: Better algorithm or data structure?
by BrowserUk (Patriarch) on Aug 30, 2010 at 16:16 UTC
    You have now completely eliminated the problem of “searching” for anything.... And it will produce “orders of magnitude” speed improvements

    It's an interesting story, but the devil is in the detail. I've been toying with johngg's idea which is essentially similar in that is uses objects that decide for themselves when something needs to be done. The reality is proving somewhat harder to implement.

    And so far, is well shy of the 2 orders of magnitude improvement achieved by graff, repellent, salva GrandFather.

    At this point, I can say no better than; "Show me the code":)


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Ahh, there is no real need for that.   :-)   TMTOWTDI, and the bottom line is that “a usefully faster solution has been found by someone out there.”   I have not been following this thread closely, anyhow.

      “Anyhow ...”