Akka-Stream implementation slower than single threaded implementation

前端 未结 2 394
迷失自我
迷失自我 2020-12-03 12:09

UPDATE FROM 2015-10-30


based on Roland Kuhn Awnser:

Akka Streams is using asynchronous message passing between Actors

2条回答
  •  时光说笑
    2020-12-03 12:38

    In addition to Roland's explanation, which I agree with fully, it should be understood that akka Streams are not just a concurrent programming framework. Streams also provide back pressure which means Events are only generated by the Source when there is demand to process them in the Sink. This communication of demand adds some overhead at each processing step.

    Therefore your single-thread and multi-thread comparison is not "apples-to-apples".

    If you want raw multi-threaded execution performance then Futures/Actors are a better way to go.

提交回复
热议问题