Write a Blog >>
SPLASH 2017
Sun 22 - Fri 27 October 2017 Vancouver, Canada
Thu 26 Oct 2017 11:00 - 11:30 at Regency D - Optimization & Networks Chair(s): Eleni Stroulia

C++ programs are widely used in performance critical applications. The standard libraries of C++, hence, are expected to be very efficient. However, experimental results show opportunities for improvements in some of the most commonly used data structures and algorithms.

We will present the performance analysis work on libc++ and libstdc++ and the changes we did to these libraries and to the LLVM compiler to optimize the code using them. This includes our contributions to standard library algorithms like string::find, libc++::basic streambuf::xsgetn, and libc++::locale. We improved these suboptimal algorithms, particularly string::find which improved by more than 10x. Similarly, we enabled the inlining of constructor and destructor of libc++::string. We will present a systematic analysis of function attributes and the places where we added missing attributes. We will present a comparative analysis of libc++ vs. libstdc++ vs. Microsoft’s C++ standard library on commonly used data structures and algorithms based on our std-benchmark (https://github.com/hiraditya/std-benchmark), that we started developing to help analyze standard C++ libraries. We will discuss the performance issues with libc++::stringstream and libc++::sort that we are currently working on. We will also present the lessons learned as a result of analyzing C++ standard libraries, for example:

  1. Iterator based algorithms can lose information and hence, can result in suboptimal performance. This is exemplified in the implementation of std::rotate where we can just exchange few pointers should the underlying container is a doubly linked list e.g., std::list.

  2. The C++ programming language has a limitation that the constructor and destructor cannot be const qualified which could have facilitated useful compiler optimizations like removing the destructor of a const std::string when the string is small enough to be kept on the stack.

Thu 26 Oct

Displayed time zone: Tijuana, Baja California change

10:30 - 12:00
Optimization & NetworksSPLASH-I at Regency D
Chair(s): Eleni Stroulia University of Alberta
10:30
30m
Talk
HHVM: Efficient and Scalable PHP/Hack Execution
SPLASH-I
11:00
30m
Talk
Performance Analysis and Optimization of C++ Standard Libraries
SPLASH-I
Aditya Kumar Samsung, Sebastian Pop Samsung Research America
11:30
30m
Talk
Verifying Network Data Planes
SPLASH-I
Nate Foster Cornell University