Fork me on GitHub
#funcool
<
2019-09-17
>
mccraigmccraig05:09:12

@mpenet are you thinking about replacing manifold?

mpenet08:09:32

yes, aleph too, exploring the idea at the very least.

mpenet08:09:43

we want to retain a very similar api for deferreds at least and we're likely going to go a different way (somewhat) for "streams" given what we will base it upon

mccraigmccraig09:09:15

hmm. i'm interested in this then @mpenet - we're very heavily manifold based, with lots of both deferred and stream processing

mccraigmccraig09:09:27

what are you thinking for stream processing ?

ikitommi06:09:56

@niwinz nice perf gain. How does the raw perf compare to plain java CF chain? E.g. no protocols, extra wrapping etc.

niwinz07:09:24

the last output was that. simple promise.core/then' usage vs plain completablefuture (no protocols no extra wrappings

niwinz07:09:34

(defn simple-promise-chain-5-raw
  []
  @(as-> (CompletableFuture/completedFuture 1) $
     (-> $
         (p/then' inc)
         (p/then' inc)
         (p/then' inc)
         (p/then' inc)
         (p/then' inc))))

(defn simple-completable-chain-5-raw
  []
  @(as-> (CompletableFuture/completedFuture 1) $
     (.thenApply ^CompletionStage $ ^Function (pu/->FunctionWrapper inc))
     (.thenApply ^CompletionStage $ ^Function (pu/->FunctionWrapper inc))
     (.thenApply ^CompletionStage $ ^Function (pu/->FunctionWrapper inc))
     (.thenApply ^CompletionStage $ ^Function (pu/->FunctionWrapper inc))
     (.thenApply ^CompletionStage $ ^Function (pu/->FunctionWrapper inc))))

niwinz07:09:30

this shows a lightweight overhead of promise just for additional function wrapping and the protocols...

niwinz07:09:14

ut the real difference is promesa:`139.088517 ns (97.5%)` vs cf:`134.078223 ns (97.5%)`

ikitommi07:09:57

oh, that’s great

niwinz10:09:49

wow, jdk12 is practically duplicates the performance: jdk8 => 112ns, jdk12 => 62ns in the same operation

niwinz10:09:56

didn't expect that...

ikitommi12:09:49

oh my, will need to test with my techempower suite, runs on java8 and the async db handler uses CFs.