Hi Timothy, that is indeed what I was surprised about. I have been reading up on agents (using the forum and the website), and one thing that I noticed is that rich is very brief on when to use send vs send-off. I tried figuring out what the difference is by sourcecode, but it just seems to call 'dispatch false' vs 'dispatch true', and I couldn't make google answer me what dispatch is doing.
Based on benchmarks as the one that started this thread, I realize that getting a program concurrent is not just using the correct syntax of refs and agents, but also understanding how to correctly construct agents, and what influences performance. One of the questions I have is what happens differently when I send versus send-off. I realize, for example, that I can rewrite one of my models to only need sends, and not send-offs. That is, if I understand blocking correctly. Currently assuming that blocking only happens when two things would like to write the same ref? On Jan 15, 12:58 am, Timothy Pratley <timothyprat...@gmail.com> wrote: > Hi Chris > > > What exactly are you trying to measure? > > I think what Boris is expecting is that for 4 CPUs, running 1,2,3,4 > equal work threads will take the same amount of time. > This is true when he calls loopfib, but not true when he calls > loopmult: > > threads: 1 > "Elapsed time: 205.458949 msecs" > "Elapsed time: 209.625273 msecs" > threads: 2 > "Elapsed time: 205.610849 msecs" > "Elapsed time: 357.785344 msecs" > threads: 3 > "Elapsed time: 205.05658 msecs" > "Elapsed time: 401.39515 msecs" > threads: 4 > "Elapsed time: 221.140317 msecs" > "Elapsed time: 469.746969 msecs" > > ie: loopfib total duration is similar for 1,2,3,4 > loopmult total duration increases in visible steps. > > I can't see why looking at the code, and am not currently in access to > a multi-core machine to test. > > Regards, > Tim. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---