Giter Site home page Giter Site logo

piercegriffiths / producer-consumer-plus-plus Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 48 KB

C++ version of https://github.com/PierceGriffiths/Producer-Consumer/

License: Apache License 2.0

C++ 89.86% CMake 10.14%
threads producer-consumer bounded-buffer cross-platform cpp17 cpp-17 cmakelists

producer-consumer-plus-plus's Introduction

Producer-Consumer++

C++ version of Producer-Consumer. As of 25 September 2019, Producer-Consumer has switched from pthreads to C11 threads, making Producer-Consumer++ redundant. This project will receive little to no maintenance from this point forwards, because I've learned to hate C++ and OOP in general while working on it.

What's the same

  • Portability
  • Argument ordering and (theoretical) maximum width
  • Control flow
  • Output format
  • Log file format

What's different - the good

  • All structs from the original project have been rewritten as classes
  • Producers and consumers have had their critical sections moved to dedicated functions in order to provide abstraction of their implementation details
  • Underlying classes are highly reusable with little to no modification

What's different - the bad (as of 20 April 2019 with GCC 8.3 on Debian Testing x86)

  • Executable size (with make release)
    • Producer-Consumer produces a 23112 byte (22.57 KiB) binary
    • Producer-Consumer++ produces a 53640 byte (52.38 KiB) binary
  • Average compile time (make cleanall && time make release was run four times for each project)
    • Producer-Consumer has an average compile time of 0.338 seconds
    • Producer-Consumer++ has an average compile time of 2.6305 seconds
  • Producer-Consumer++ is, on average, about 40% slower than Producer-Consumer when both versions are given identical arguments

producer-consumer-plus-plus's People

Contributors

piercegriffiths avatar

Stargazers

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