Re: Potential bug: pmap vs chunked seqs

2011-10-23 Thread Andy Fingerhut
It isn't hard to write your own variation of pmap that does not do more parallelism than you want, regardless of whether the input sequence is chunked or not. I wrote one for a Clojure submission to the computer language benchmarks game a year or so ago. Besides avoiding unwanted parallelism for

Re: Potential bug: pmap vs chunked seqs

2011-10-21 Thread Marshall T. Vandegrift
Stefan Kamphausen writes: > Chunked seqs are supposed to realize more elements than you > consume. That's for performance reasons. But since you will only ever > apply side-effect-free functions to seqs, that will make no > difference, no? Sorry, yes, I'm talking about within the code of `pmap'

Re: Potential bug: pmap vs chunked seqs

2011-10-21 Thread Stefan Kamphausen
Why do you think, there is a bug? You are referring to the /code/, i.e. the implementation, of things, which is not a defined interface. At the same time, the /documentation/ describes the actual behavior quite well. Chunked seqs are supposed to realize more elements than you consume. That's f

Potential bug: pmap vs chunked seqs

2011-10-21 Thread Marshall T. Vandegrift
Hi: I found what I think might be considered a bug, but I'm not certain. The doc-string for `pmap' just says that the passed-in function is applied "in parallel," but the code as-written is pretty clearly intended to keep only (+ 2 #CPUS) future-wrapped function applications realized at a time. I