Differences between revisions 5 and 6
Revision 5 as of 2018-10-04 22:41:40
Size: 3819
Editor: SamatJain
Comment: Patterns and Techniques Used in the Houdini 3D Graphics Application (Mark Elendt)
Revision 6 as of 2019-02-09 03:18:21
Size: 3842
Editor: SamatJain
Comment: Add ToC
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
<<TableOfContents>>

See also CodingStyle/C++.

STL

Wrap an existing C-style pointer to an array with std::vector: http://stackoverflow.com/a/15203325/14878; modifies std::vector internals to work.

C++11

Move semantics/perfect forwarding

Smart pointers

Data structures

B-tree-based maps & sets

  • In 2013, Google open-sourced a mostly-STL-compatible b-tree implementation: B-tree containers from Google. The old project is on Google code, but JGRennison/cpp-btree is a fork with minor fixes and some C++11 support (e.g. move constructors, etc).

  • bingmann/stx-btree

  • tlx library contains a fast loser tree implementation, a newer version of the bingmann/stx-btree implemtnation, a smart pointer replacement for shared_ptr called counting_ptr, and std::string helper functions missing from STL.

C++ and Python

Interesting libraries

Other stuff

Videos

Curiously recurring C++ bugs at Facebook

Curiously recurring C++ bugs at Facebook

  • Use -fsanitize-address and -fsanitize-address-use-after-scope

  • Use -Wshadow, and deal with noisy warnings

Patterns and Techniques Used in the Houdini 3D Graphics Application (Mark Elendt)

CppCon 2018: Mark Elendt “Patterns and Techniques Used in the Houdini 3D Graphics Application”

  • Vector that uses realloc() instead of new/malloc(). Significantly faster than std::vector, but has problems with objects that are not std::trivially_relocatable.

  • Copy-on-write used in several places; paged arrays to used copy-on-write in arrays
  • Reference-counted strings to avoid copying strings. Bunch of constexpr stuff used to make static initialization (i.e. program startup) faster.

SamatsWiki: ProgrammingLanguages/C++ (last edited 2022-03-17 01:17:02 by SamatJain)