Coder Social home page Coder Social logo

streamprocessor's Introduction

Playing with stream processing on top of Reactive Streams.

Examples in Test.java

Perf test in PerfTest.java

To test performance:

./gradlew benchmarks '-Pjmh=-f 1 -tu s -bm thrpt -wi 5 -i 5 -r 5 -prof GC .*PerfTest.*'

Results: May 22, 2014 - Macbook Pro

Benchmark                                        (size)   Mode   Samples         Mean   Mean error    Units
e.p.PerfTest.liftMultiStep                            1  thrpt         5 15471737.553   197644.846    ops/s
e.p.PerfTest.liftMultiStep                         1024  thrpt         5    12279.060      121.447    ops/s
e.p.PerfTest.liftMultiSubscribe                       1  thrpt         5 14447955.163   287840.378    ops/s
e.p.PerfTest.liftMultiSubscribe                    1024  thrpt         5     8378.420      404.662    ops/s
e.p.PerfTest.liftSingleSubscribe                      1  thrpt         5 26781152.737   383087.870    ops/s
e.p.PerfTest.liftSingleSubscribe                   1024  thrpt         5    16862.970      573.027    ops/s
e.p.PerfTest.processWithSupplier                      1  thrpt         5 27625375.587   585380.799    ops/s
e.p.PerfTest.processWithSupplier                   1024  thrpt         5    16968.807      303.570    ops/s
e.p.PerfTest.processWithSupplierMultiSubscribe        1  thrpt         5 15348067.120   127768.007    ops/s
e.p.PerfTest.processWithSupplierMultiSubscribe     1024  thrpt         5     8529.277      108.034    ops/s
e.p.PerfTest.processWithSupplierMultistep             1  thrpt         5 13377367.313   147047.679    ops/s
e.p.PerfTest.processWithSupplierMultistep          1024  thrpt         5    11976.350       73.694    ops/s
e.p.PerfTest.processWithoutSupplier                   1  thrpt         5 28002030.117   203893.966    ops/s
e.p.PerfTest.processWithoutSupplier                1024  thrpt         5    17249.917      251.941    ops/s

The interesting lines to look at here are:

Benchmark                                        (size)   Mode   Samples         Mean   Mean error    Units
e.p.PerfTest.liftMultiStep                            1  thrpt         5 15471737.553   197644.846    ops/s
e.p.PerfTest.processWithSupplierMultistep             1  thrpt         5 13377367.313   147047.679    ops/s

These are a stream doing 3 transformations, with lift winning at 15.4m ops/second.

e.p.PerfTest.liftSingleSubscribe                      1  thrpt         5 26781152.737   383087.870    ops/s
e.p.PerfTest.processWithSupplier                      1  thrpt         5 27625375.587   585380.799    ops/s

These are a stream doing a single transformation with process winning at 27.6m ops/second.

The analysis of these results is that:

  • process is slightly faster (27.6m vs 26.7m ops/second) than lift when doing a single transformation.
  • lift is slightly faster (15.4m vs 13.3m ops/second) than process when doing multi-step transformations.

streamprocessor's People

Contributors

benjchristensen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.