Skip to content

Some loop-based approaches vs Java 8 streams and IO vs NIO comparsions via jmh.

Notifications You must be signed in to change notification settings

Shenker93/jmh-time-comparison-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

INSTALLATION

Just use mvn clean install command. You will get benchmarks.jar file in target directory as a result. Just use java -jar target/benchmarks.jar command to start benchmarking.

DATA

To compare some loop- and stream-based approaches lists (actually ArrayList) of different length and data (random and all-the-same elements) are used.

To compare IO and NIO approaches to file reading resources/test.txt file is used. Benchmark is running in single thread mode now.

BENCHMARKING

By default, 10 warm-up and measurement iterations are used in benchmarks. However, feel free to change this value to our own. @Warmup and @Measurement annotations are used in StreamComputing class definition to define number of iterations. Also you can change BenchmarkMode

You can also use command-line args to change this settings or specify another (use -h to view full list). Comparing to annotations, command-line args have higher priority.

Some benchmarks are available on travis-ci build page (benchmark is wrapped into junit test, see build icon on the top of readme). However, according to some sources, such results accuracy can be lower, so it's better to use commands from installation block.

About

Some loop-based approaches vs Java 8 streams and IO vs NIO comparsions via jmh.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages