Code Monkey home page Code Monkey logo

performance_comparison_of_buffering_strategies's Introduction

Performance Comparison of Buffering Strategies in Java

Description

This project compares the performance of different buffering strategies in Java. The strategies are:

  • FileChannel with indirect buffers
  • FileChannel with direct buffers
  • FileChannel using the transferTo() operation
  • Buffered I/O Stream
  • Stream read into a byte array managed by the programmer

The results are presented in the following table:

Type of buffering SmallFile and Buffer = 1024 BigFile and Buffer = 1024 SmallFile and Buffer = 65536 BigFile and Buffer = 65536
FileChannel with indirect buffers 30 ms 84 ms 14 ms 17 ms
FileChannel with direct buffers 2 ms 32 ms 2 ms 6 ms
FileChannel using the transferTo() operation 6 ms 27 ms 0 ms 31 ms
Buffered I/O Stream 0 ms 14 ms 44 ms 46 ms
Stream read into a byte array managed by the programmer 9 ms 18 ms 5 ms 0 ms

How to run

The project is a Java Project. To run it, you need to have Java installed on your machine. After that, you can run the project by opening a terminal in the directory and executing the following commands depending on your operating system:

Mac/Linux Give the permission to execute the script (only the first time):

chmod +x exec.sh

and then execute it:

./exec.sh

Windows Just execute it:

.\exec.bat

performance_comparison_of_buffering_strategies's People

Contributors

lorenzobandini 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.