> Feedback is always welcome. Very entertaining! :)
Bucketing is actually counter productive in your example. send already takes care of limiting the active threads by using a thread pool, and can ballance the work better than bucketing. When I run your code unchanged it takes 2400ms, if I set the number of buckets equal to the number of tasks, it runs in 2200ms. However for this sort of problem I don't think agents are the right way to model it, as you aren't really tracking a state. You can use the inbuilt pmap for this sort of 'computation chunks' problem: (doseq [r (pmap decode-md5 work-units)] (println r)) Executes in 1400ms for me. Of course benchmarks are fickle things - my main point is that asthetically agents are an unnecessary complication here. Of course its still great as an example of how they work :) Regards, Tim. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
