Tech Off Post

Single Post Permalink

View Thread: CCR notoriously slow? Benchmarks inside
  • User profile image

    Hi, Port.Post takes about 300 nano secs,  and task scheduling overhead is in the order of the OS thrad switch time (so again less than 1 micro sec). Last time we checked are on par or faster than any alternative you tried, for the same type of computation.

    One wierd thing i see in your code is that your CCR example is overly complicated compared to the other comparisons. You are doing
    1) one port post to a persisted receiver
    2) then you do another post post to an iterator, within that receiver!
    3) then you loop in an iterator
    4) then you call the computational task!

    All you need to do, for apples to apples comparison:

    1) post N times to a persisted receiver
    2) Have the receiver execute the computational task! When some counter reaches zero, print our result

    for example

    for (int i = 0;i < TRIALS i++)

    Arbiter.Receive(true, port, (count) => ComputionalTask(count));