Skip to content

Read data from the standard input stream (stdin) and write it back to the standard output stream (stdout).

License

Notifications You must be signed in to change notification settings

dEajL3kA/StreamBuffer

Repository files navigation

Stream Buffer

Read data from the standard input stream (stdin) and write it back to the standard output stream (stdout).

The implementation uses separate threads for reading/writing and an internal ring buffer.

Description

Writing text to the terminal, e.g. by using the printf() family of functions, can be surprisingly slow – especially on the Windows platform. This means that text output can easily become the performance bottleneck of console application! This is mostly evident for console application that need to output large amounts of text.

As it turns out, passing the text output through and additional ring buffer can greatly improve the performance 😏

Usage

Simply pass the output of the source program to the streambuff utility via pipe operator:

some_program.exe [parameters] | streambuff.exe

License

Copyright (c) 2023 “dEajL3kA” <[email protected]>
This work has been released under the MIT license. See LICENSE.txt for details!

Acknowledgement

Using Buffer icons created by Muhammad_Usman – Flaticon.

About

Read data from the standard input stream (stdin) and write it back to the standard output stream (stdout).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages