funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
mccraigmccraig 2019-09-17T05:45:12.029Z

@mpenet are you thinking about replacing manifold?

mpenet 2019-09-17T08:38:32.034500Z

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

mpenet 2019-09-17T08:41:43.034700Z

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

mccraigmccraig 2019-09-17T09:19:15.035Z

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

mccraigmccraig 2019-09-17T09:19:27.035200Z

what are you thinking for stream processing ?

ikitommi 2019-09-17T06:05:56.031800Z

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

niwinz 2019-09-17T07:08:24.033400Z

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

niwinz 2019-09-17T07:08:34.033600Z

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

niwinz 2019-09-17T07:09:30.033900Z

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

niwinz 2019-09-17T07:10:14.034100Z

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

ikitommi 2019-09-17T07:10:57.034300Z

oh, that’s great

niwinz 2019-09-17T10:31:49.037200Z

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

niwinz 2019-09-17T10:34:56.038400Z

didn't expect that...

ikitommi 2019-09-17T12:08:49.040300Z

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