-
Notifications
You must be signed in to change notification settings - Fork 136
Benchmark for SimpleReact
These benchmarks, on a Mac Book pro shows raw performance / overhead of CompletableFuture task management & Stream creation, without (sync tests) and with (async tests) the overhead of resubmitting tasks to the ExecutorService.
- Model Name: MacBook Pro
- Processor Name: Intel Core i7
- Processor Speed: 2.5 GHz
- Number of Processors: 1
- Total Number of Cores (physical) : 4
- Memory: 16 GB
Throughput can be higher or lower depending on whether calls are all made asynchronously or synchronously on the same thread and how the work load is constructed. The number of operations were scaled upwards by increasing the number of chains and by increasing the amount of data flowing through to completion.
[8 Sequential LazyFuture Streams with 60 chained CompletableFutures and 1 million records each operating concurrently].
- average response time 1453332575 nanos (1.45 secs or 0.68 per second).
- Equivalent to 335,779,991 (335.8 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- average response time 15010002962 nanos (15 secs or 0.067 per second).
- Equivalent to 32,511,652 (32.5 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- An order of magnitude slower than the sync performance at the same volume
- average response time 417446427 nanos (0.417446427 secs or 2.4 per second).
- Equivalent to 263,506,866 (263.5 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- average response time 46841291754 nanos (4.68 secs or 0.21 per second).
- Equivalent to 23,483,553 (23.5 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- An order of magnitude slower than the sync performance at the same volume
- average response time 77381074.2 nanos (0.0773810742 secs or 12.9 per second).
- Equivalent to 142,153,622 (142 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- average response time 933740055.3 nanos.
- Equivalent to 11,780,580 (11.78 million) operations per second (if no garbage collector overhead).
- Short burst performance capacity.
- This is an order of magnitude than synchronous chaining on the same the executing thread.
This benchmark will take into account impact of garbage collection due to object creation. No special garbage collector settings were used.
- Max functions applied per second 👍 431,202,700 (431.2 million)
- Min functions applied per second 👍 79,631,350 (79.6 million)
- Avg functions applied per second 👍 137,353,809 (137.4 million)
(See the async benchmark below for impact of resubmission after each call).
Users can switch between sync (next task executed on completing thread) / async (next task resubmitted to task executor) execution via the sync() and async() operators (since v0.84 - expected release date 7 April 2015).
160895200 244944375 334322750 80170700 162339000 245307100 84680425 169427075 79695000 154736850 79791125 82663775 163609525 80296600 163676850 84358300 169515900 80967200 85906750 85197300 165717375 85997500 90071850 80427025 86157625 170040450 260851800 343009875 431202700 82807475 161687600 248474200 86414850 88685675 82317825 168694075 85677450 170073975 86073150 82681775 79631350 84501625 82729400 84151325 81771325 89549925 180017250 84175975 84288225 82398300 169320750 83124350 164761425 87031775 175024075 260632975 86038800 85143075 83612325 168765975 85529600 167350225 254173875
- Model Name: MacBook Pro
- Model Identifier: MacBookPro9,1
- Processor Name: Intel Core i7
- Processor Speed: 2.6 GHz
- Number of Processors: 1
- Total Number of Cores: 4
- L2 Cache (per Core): 256 KB
- L3 Cache: 6 MB
- Memory: 8 GB
- Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
- Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
- -Xms4g
- -Xmx4g
- -XX:MaxMetaspaceSize=256M
- -server
- Default Parallel GC is used
- MinHeapFreeRatio = 40
- MaxHeapFreeRatio = 70
- MaxHeapSize = 4294967296 (4096.0MB)
- NewSize = 1431306240 (1365.0MB)
- MaxNewSize = 1431306240 (1365.0MB)
- OldSize = 2863661056 (2731.0MB)
- NewRatio = 2
- SurvivorRatio = 8
- 4 threads
- 8 max active stream
- 4 min active streams
- Chain length 20
Each function past to / through a ForkJoinPool
Sample output from the benchmark program:
- 10895580
- 13812420
- 14028800
- 13108380
- 13802820
- 13702560
- 13821380
- 13840820
- 13760800
- 13752180
- 13748880
- 13852600
- 13814600
- 13813820
- 13679800
- 13675800
- 13806400
- 13759620
- 13809820
- 13708400
- 13769720
- 13835100
- 13876400
- 13828600
- 13832840
- 13726060
- 13836700
- 13760600
- 13776100
- 13745700
- 13702440
- 13714220
- 13697700
- 13691620
- 13674100
- 13825460
- 13681420
- 13770980
- 13879360
- 8071400
- 13798560
- 13849180
- 13864420
- 13836860
- 13774900
- 13930800
- 13800160
- 13835880
- 13796200
- 13788880
- 13725980
- 13653260
- 13864960
- 13725280
- 13586240
- 13747080
- 13760880
- 13770240
- 13737420
- 13669680
- 13818800
- 13833920
- 13682320
- 13760880
- 13745840
- 13818380
- 13739140
- 13803000
- 13982200
- 13851200
- 13787160
- 13701860
- 13645720
- 13793760
- 13678400
- 13687560
- 13885880
- 13686880
- 13780140
- 13746200
- 13697900
- 13709800
- 13728600
- 13730120
- 13849200
- 13756360
- 13724580
- 14016120
- 13814160
- 13768600
- 13784420
- 13697280
- 13759420
- 13842600
- 13708340
- 13748260
- 13808400
- 13840060
- 13754240
- 13872800
- 13842420
- 13736460
- 13815440
- 13745300
- 13725780
- 13746880
- 13773380
- 13926800
- 13634360
- 13190620
- 12721260
- 12654400
- 13029400
- 12920000
- 12885800
- 13050640
- 13404000
- 12960620
- 12806000
- 12572620
- 12954000
- 12948400
- 12947560
- 13053440
- 12949160
- 13025400
- 12910640
- 12902580
- 12585360
- 12521500
- 12734980
- 12831540
- 12896740
- 12539860
- 12518560
- 12540120
- 12721220
- 12921200
- 13135200
- 12918500
- 12726260
- 12561400
- 12525200
- 12537780
- 12856440
- 12914740
- 12884540
- 12776600
- 12566000
- 12468280
- 12626720
- 12911620
- 12901100
- 12951800
- 12763560
- 12509840
- 12626360
- 12887000
- 13001720
- 12906400
- 12836940
- 12543460
- 12497400
- 12654780
- 12908200
- 12920200
- 12807280
- 12553320
- 12570580
- 12568000
- 12768080
- 13011460
- 12938100
- 12765800
oops - my bad