Skip to main content

Research Repository

Advanced Search

The Design and Evaluation of a Modern C++ Library

Chalmers, Kevin

Authors

Kevin Chalmers



Abstract

Although many CSP inspired libraries exist, none yet have targeted modern C++ (C++11 onwards). The work presented has a main objective of providing a new C++ CSP library which adheres to modern C++ design principles and standards. A secondary objective is to develop a library that provides simple message passing concurrency in C++ using only the standard library. The library is evaluated in comparison to JCSP using microbenchmarks. CommsTime and StressedAlt are used to determine the properties of coordination time, selection time, and maximum process count. Further macrobenchmarks, Monte Carlo π and Mandelbrot, are gathered to measure potential speedup with C++ CSP. From the microbenchmarks, it is shown that C++ CSP per-forms better than JCSP in communication and selection operations, and due to using the same threading model as JCSP can create an equal number of processes. From the macrobenchmarks, it is shown that C++ CSP can provide an almost six times speed up for computation based workloads, and a four times speedup for memory based work-loads. The implementation of move semantics in channels have provided suitable enhancements to overcome data copy costs in channels. Therefore, C++ CSP is considered a useful addition to the range of CSP libraries available. Future work will investigate other benchmarks within C++ CSP as well as development of networking and skeleton based frameworks.

Citation

Chalmers, K. (2016, August). The Design and Evaluation of a Modern C++ Library. Presented at Communicating Process Architectures 2016, Copenhagen, Denmark

Presentation Conference Type Conference Paper (Published)
Conference Name Communicating Process Architectures 2016
Start Date Aug 21, 2016
End Date Aug 23, 2016
Acceptance Date May 31, 2016
Publication Date 2016
Deposit Date Mar 15, 2017
Book Title Communicating Process Architectures 2016
ISBN 978-0-9934385-1-6
Keywords Modern C++, CSP library, microbenchmarking, macrobenchmarking, C++
Public URL http://researchrepository.napier.ac.uk/Output/811952