Is C++ fast?

A library that I work on often these days, meshoptimizer, has changed over time to use fewer and fewer C++ library features, up until the current state where the code closely resembles C even though it uses some C++ features. There have been many reasons behind the changes – dropping C++11 requirement allowed me to make sure anybody can compile the library on any platform, removing std::vector substantially improved performance of unoptimized builds, removing algorithm includes sped up compilation. However, I’ve never quite taken the leap all the way to C with this codebase. Today we’ll explore the gamut of possible C++ implementations for one specific algorithm, mesh simplifier, henceforth known as simplifier.cpp, and see if going all the way to C is worthwhile.

14 Comments

  1. 2019-01-20 11:55 pm
  2. 2019-01-21 1:07 am
    • 2019-01-22 7:20 am
      • 2019-01-22 4:27 pm
    • 2019-01-22 9:48 am
  3. 2019-01-21 3:40 am
  4. 2019-01-22 11:14 am
    • 2019-01-22 3:01 pm
    • 2019-01-22 4:34 pm
      • 2019-01-22 8:19 pm
        • 2019-01-22 9:07 pm
          • 2019-01-22 11:15 pm
          • 2019-01-23 12:45 am
          • 2019-01-23 2:11 am