8000 Implementation of toBeMaxed · Issue #10 · akarnokd/akarnokd-misc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Implementation of toBeMaxed #10
Open
@davidmoten

Description

@davidmoten

The shakespeare benchmark implementation for j.u.s.Stream has this assignment :

Function<String, IntStream> toBeMaxed =
word -> Stream.of(first3.apply(word), last3.apply(word))
.flatMapToInt(Function.identity());
:

This would probably be more performant as this:

Function<String, IntStream> toBeMaxed =
            word -> IntStream.concat(first3.apply(word), last3.apply(word));

From a fairness perspective this should be tried because I notice the other Shakespeare implementations do this with the equivalent of concat rather than flatMap.

I'll be interested to see the results. By the way do you publish the benchmark results (those nifty graphs) somewhere (other than twitter)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0