Files
rippled/src/ripple/basics
Howard Hinnant 1ba7c4b6ee Remove unneeded member initializer:
* This works around a clang bug.
* Also un-commented correctly deleted copy members.
2015-04-13 10:24:47 -07:00
..
2015-04-10 19:11:28 -07:00
2015-01-20 16:45:01 -08:00
2015-02-02 17:01:17 -08:00
2015-03-18 19:39:26 -07:00
2015-03-16 20:54:15 -04:00
2015-02-02 17:01:17 -08:00
2015-02-11 20:42:38 -05:00
2015-01-20 16:45:01 -08:00
2015-03-09 17:49:39 -04:00
2015-04-10 19:11:28 -07:00
2015-01-20 16:45:01 -08:00
2015-03-26 12:38:33 -04:00
2015-01-05 11:46:11 -08:00
2015-03-02 16:49:56 -05:00

Basics

Utility functions and classes.

ripple/basic should contain no dependencies on other modules.

Choosing a rippled container.

  • std::vector

    • For ordered containers with most insertions or erases at the end.
  • std::deque

    • For ordered containers with most insertions or erases at the start or end.
  • std::list

    • For ordered containers with inserts and erases to the middle.
    • For containers with iterators stable over insert and erase.
    • Generally slower and bigger than std::vector or std::deque except for those cases.
  • std::set

    • For sorted containers.
  • ripple::hash_set

    • Where inserts and contains need to be O(1).
    • For "small" sets, std::set might be faster and smaller.
  • ripple::hardened_hash_set

The following container is deprecated

  • std::unordered_set
  • Use ripple::hash_set instead, which uses a better hashing algorithm.
  • Or use ripple::hardened_hash_set to prevent algorithmic complexity attacks.