in reply to Re: Thread::Queue vs Thread::Queue::Any
in thread Thread::Queue vs Thread::Queue::Any

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^2: Thread::Queue vs Thread::Queue::Any

Replies are listed 'Best First'.
Re^3: Thread::Queue vs Thread::Queue::Any
by BrowserUk (Patriarch) on Jul 14, 2009 at 17:14 UTC
    My question was, why I've different values for two different approaches? And for that question I didn't get an answer, not even some clues,

    To get an answer to that question, you have to actually ask it. But you didn't.

    The only question you asked was:

    Should we use Thread::Queue::Any instead of Thread::Queue?

    Which is a very reasonable question.

    And if your results were correct, meaningful and valid, then the answer would have been a resounding use T::Q::A. But your benchmark is invalid; which renders any results it produces meaningless; and the results you posted are bogus.

    There is simply no way T::Q::A could ever be faster or use less lock states than T::Q, since T::Q::A use T::Q, and therefore does everything T::Q does + (LOTS OF SLOW STUFF) more!

    So the answer to the question you actually asked is: T::Q can do everything T::Q::A can do, and do it more quickly, with an identical number of lock states. There is therefore, absolutely no reason to ever use the latter. (Is that clear enough?)


    Now, back to that new and originally unasked question: "why I've different values for two different approaches?".

    And the answer is: Because they are different!

    For the detail of why they are different, see my original answer which goes to great lengths to explain it.


    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.
    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.