Updated SotL/L documents for Iteration 2

Brian Goetz brian.goetz at oracle.com
Mon Sep 10 12:25:26 PDT 2012


That's something we need to discuss.

In the past, we outlined a few strategies for getting to primitive support:

  - Primitive specialization of streams (e.g., IntStream) with overloads 
like map(IntMapper) -> yields IntStream.  We'd probably just do 
Int/Long/Double.
  - VM magic to make boxing costs go away (and give ponies to all the 
children of the world)
  - Fuse common operations to expose primitive opportunities, like a 
fused mapReduce(IntMapper, IntOperator)
  - Specialized version of the above, such as sumBy(IntMapper)
  - Box elimination in libraries (theoretically possible, but probably 
only if pipelines can be precompiled)

I'm leaning towards preferring the first, because:
  - It doesn't rely on magic
  - It lets us expose methods like sum(), max(), min(), and sort() on 
{Int,Long,Double}Stream -- this is a huge plus
  - It lets us bring more numerics firepower to bear on things like 
DoubleStream.sum()

Obviously the increased API surface area is a minus.

On 9/10/2012 2:09 PM, Remi Forax wrote:
> On 09/10/2012 07:57 PM, Brian Goetz wrote:
>> Re-sending copies of documents sent last week.
>>
>
> I may be wrong, but there is no mention of primitive specializations.
> Is it something that is still in flux or not ?
>
> Rémi
>
>


More information about the lambda-libs-spec-experts mailing list