2014-09-19 14:09 GMT+02:00 Marko Topolnik <[email protected]>:

>
>
>>>> As for use-cases of parellelization, there is really nothing specific
>>>>> to a result set about it: pick your favorite example of
>>>>> computation-intensive processing of a large dataset. Whenever I/O speed
>>>>> overtakes CPU speed, you've got a parallelization target. My specific use
>>>>> case are Lucene queries executed against each row of DB data. The key
>>>>> advantage of a lazy stream is that it turns O(n) space into O(1), making
>>>>> your code scalable to datasets of indefinite size.
>>>>>
>>>>
>>>> (... if you have infinite cores ;-) )
>>>>
>>>
>>> Actually, whenever your server is not at 100% utilization by concurrent
>>> client pressure, and that's basically almost all the time. At peak request
>>> intensity it can be true that a single thread per request is better, but it
>>> is by no means obvious. If all the requests are CPU-limited, then serving
>>> one request at a time, using parellel processing, would again be the best
>>> option (less DB connections and less state maintenance for exactly the same
>>> overall throughput).
>>>
>>
>> I meant that the O(1) assumption is only correct with an infinite number
>> of cores. Otherwise, you'll get something like O(n / c), which is still O(n)
>>
>
> I think you read my comment as O(1) *time*, but my point is about O(1)
> *space*. Sequential processing would also be O(1) in space.
>

Ah, my bad. Sorry about that.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to