Tag: datastructures

Graph Algorithms and Data Structures in C++20 – Phil Ratzloff & Andrew Lumsdaine – CppCon 2022

  • Lobby
  • Tag Archives: datastructures

https://cppcon.org/
---

Graph Algorithms and Data Structures in C++20 - Phil Ratzloff, Andrew Lumsdaine - CppCon 2022
https://github.com/CppCon/CppCon2022

The C++ Standard Library is a valuable collection of generic algorithms and data structures that improves the usability and reliability of C++ software. Graph algorithms and data structures are notably absent from the standard library, and previous attempts to fill this gap have not gained widespread adoption.

This session presents an approach for expressing graph algorithms in a modern, composable, and extensible, aka generic, fashion. Concepts provide a means for a systematic organization of the type requirements for graph algorithms to operate correctly and efficiently. Remarkably, these type requirements can be expressed not in graph-specific terms, but rather in terms of existing sets of requirements already in place for basic containers in C++, i.e., ranges. Using this conceptual framework, we develop several generic algorithms and concrete data structures as well as the emerging proposal for a standard graph library.
---

Phil Ratzloff

Phil Ratzloff is a Distinguished Software Developer and C++ advocate at SAS Institute. He has used C++ for 27 years on applications using graphs for business cost analysis and fraud detection.
---

Andrew Lumsdaine

Andrew Lumsdaine is an internationally recognized expert in the area of high-performance computing who has made important contributions in many of the constitutive areas of HPC, including systems, programming languages, software libraries, and performance modeling. His work in HPC has been motivated by data-driven problems (e.g., large-scale graph analytics), as well as more traditional computational science problems. He has been an active participant in multiple standardization efforts, including the MPI Forum, the BLAS Technical Forum, the ISO C++ standardization committee, the oneAPI Technical Advisory Board, and the SYCL Advisory Panel. Open source software projects resulting from his work include the Matrix Template Library, the Boost Graph Library, and Open MPI.
---

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
YouTube Channel Managed by Digital Medium Ltd https://events.digital-medium.co.uk

#cppcon #algorithms #datastructures

Filed under: UncategorizedTagged with: , , , , , , ,

Scalable and Low Latency Lock-free Data Structures in C++ – by Alexander Krizhanovsky – CppCon 2022

  • Lobby
  • Tag Archives: datastructures

https://cppcon.org/
---

Scalable and Low Latency Lock-free Data Structures in C++ - Alexander Krizhanovsky - CppCon 2022
https://github.com/CppCon/CppCon2022

Imagine that your program uses many threads, which insert and lookup millions times per second in a large data structure like std::map or std::unordered_map. Typically, you have to switch to a lock-free data structure for this task. Lock-free approaches perfectly scale data structures for multi-core systems, but hash tables and trees need some reorganization as more and more items are inserted and these reorganizations are hard to make lock-free. But the problem isn't only in contention and we also need to efficiently work with memory to develop a high performance data structure for the modern hardware. Cache conscious data structures address the problem by efficient usage of CPU caches and reducing the number of accesses to the main memory.

This talk makes a quick survey over several lock-free (primarily variations of hash table) and cache conscious (mostly trees) data structures. We'll discuss the best use cases for the data structures and their limitations. Besides performance in average cases, we'll also focus on worst case scenarios, which may introduce high tail latency on large busy systems. Tail, or high percentile, latency is a severe problem since it may reach significant values and the small percent of problem cases can be not so small in absolute values, e.g. if you service 1M users, then only 0.1% of them experiencing high processing time is a problem.

The main part of the talk is a step by step C++ implementation of Hash Trie, a hybrid lock-free cache conscious data structure, which provides good access time in average and worst case. We'll do microbenchmarks of the data structure and compare it with other data structures.

You'll learn about:
* when standard containers and locking mechanisms aren't enough
* several advanced data structures: split ordered lists and other variations of lock-free hash tables, tries (partricia trees) and hybrid data structures
* x86-64 memory ordering and cache hierarchy, operating system preemption and how to employ all the knowledge to implement a very fast data structure
* gotchas of data structures benchmarking, such as keys distribution, latency vs throughput, worst cases and so on
* an open source lock-free cache conscius Hash Trie implementation
---

Alexander Krizhanovsky

Alexander is the CEO of Tempesta Technologies, Inc., and is the architect of Tempesta FW, a high performance open source Linux application delivery controller. Alexander is responsible for the design and performance of several products in the areas of network traffic processing and databases. He designed the core architecture of a Web application firewall, mentioned in the Gartner Magic Quadrant '15, and the MariaDB temporal data tables.

Alexander gave talks at Netdev, SCALE, Linux Conf Australia, MariaDB user conferences, All Things Open, FOSDEM, Percona Live, IBM CASCON, and many other conferences. Alexander is also the author of a very fast lock-free MPMC ring buffer queue, published by the Linux Journal in 2013.
__

Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #datastructures

Filed under: UncategorizedTagged with: , , , , ,