funcool 2019-09-17

@mpenet are you thinking about replacing manifold?

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

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

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

what are you thinking for stream processing ?

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

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

(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))))

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

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

oh, that’s great

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

didn't expect that...

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