Loading…
Attending this event?
Cottonwood 8/9 clear filter
arrow_back View All Dates
Tuesday, September 17
 

09:00 MDT

Relocation: Blazing Fast Save And Restore, Then More!
Tuesday September 17, 2024 09:00 - 10:00 MDT
Programming normal C++ leads to the use of dynamic memory, pointer chasing, and other issues that zap performance. Because there haven’t been practical solutions to those problems we seldom discuss them, creating the impression that they are unavoidable. Fortunately, the same C++ that binds us frees us to devise techniques centered around the concept of “relocatability” to solve those issues. We will explain what relocatability is and how to achieve it.

Consider the example of runtime polymorphism. You may want to have interfaces and implementations of interfaces. If your object refers to a “polymorphic” member, it normally cannot be implemented as a concrete sub-object, only as a base class pointer that points to a dynamically allocated instance of a derived class. This leads to millions of small objects dispersed throughout memory, all referencing one another. This is already very expensive and other issues around object layout makes things worse. One presenter witnessed 7% of Google Search Qrewrite CPU spent on dealloc, which must chase pointers to finish!

When we want to save the state of such programs, we must traverse those complex object graphs and encode them in complex file formats: serialization is required. Restore is further complicated by needing millions of small allocations which are often ephemeral. In general, working with data architected in this way is error prone and has abysmal performance. Our alternative to these complex object graphs is to lay out program data according to program design objectives, in our case allowing object moves. This is the essence of relocation. The set of techniques we will share with you is complete. Now that we can represent program state as simple, relocatable data, save and restore is simply memory mapping buffers.

For runtime polymorphism, we can use “Type Erasure”, the Design Pattern behind `std::function`, tailored for relocatability. Our Type Erasure performs better than normal polymorphism. We get better performance, we have no allocations, no deallocations, and no pointer chasing; resulting in happier programming. For other issues we get benefits of the same magnitude.

We will explain both well known and novel relocation techniques. The novel techniques have required the formulation of Generic Programming concepts including what we call “Value Manager”. We are presenting these for the first time.
Speakers
avatar for Eduardo Madrid

Eduardo Madrid

Consultor
Eduardo has been working for many years on financial technologies, automated trading in particular, and other areas where performance challenges can be solved in C++. He contributes to open source projects and teaches advanced courses on Software Engineering with emphasis in Generic... Read More →
Tuesday September 17, 2024 09:00 - 10:00 MDT
Cottonwood 8/9

12:30 MDT

CppCast Episode 390: CppCon Special
Tuesday September 17, 2024 12:30 - 13:30 MDT
In this session, the hosts of CppCast, Timur Doumler and Phil Nash, will be recording CppCast Episode 390: CppCon Special at CppCon in front of a live audience. The guest for this episode is... you! This will be an interactive episode in which the audience can ask us questions directly on the show – about the podcast, our work, or anything else in the world of C++ and beyond!
Speakers
avatar for Timur Doumler

Timur Doumler

Independent, Independent
Timur Doumler is the co-host of CppCast and an active member of the ISO C++ standard committee, where he is currently co-chair of SG21, the Contracts study group. Timur started his journey into C++ in computational astrophysics, where he was working on cosmological simulations. He... Read More →
avatar for Phil Nash

Phil Nash

Yak Shaver, Shaved Yaks Ltd
Phil is the original author of the C++ test framework, Catch2. He's an independent trainer and consultant. He's also a member of the ISO C++ standards committee, organiser of C++ London and C++ on Sea, as well as co-host and producer of CppCast. More generally he's an advocate for... Read More →
Tuesday September 17, 2024 12:30 - 13:30 MDT
Cottonwood 8/9

14:00 MDT

Back to Basics: Debugging and Testing
Tuesday September 17, 2024 14:00 - 15:00 MDT
Your code is not working -- PANIC! Well, not quite! In this session we are going to show you how to write tests to uncover bugs in the first place (and to guard against regressions when they’re fixed) and how to identify the bugs’ root causes with a debugger. These two fundamental software engineering skills (debugging and testing) in combination helps us write better software by improving our confidence that bugs do not reappear -- especially as software scales and changes over time. Debugging and testing are two related skillsets, and in this talk we will provide an introduction and concrete tools showing by example how to utilize each skill together. If you have never used a debugger and think ‘if it compiles it must work’ then this is the talk for you.
Speakers
avatar for Greg Law

Greg Law

CEO, Undo.io
Greg is co-founder and CEO at Undo. He is a programmer at heart, but likes to keep one foot in the software world and one in the business world. Greg finds it particularly rewarding to turn innovative software technology into a real business. Greg has over 25 years' experience in... Read More →
avatar for Mike Shah

Mike Shah

Professor / (occasional) 3D Graphics Engineer
Mike Shah is currently a teaching faculty with primary teaching interests  in computer systems, computer graphics, and game engines. Mike's research interests are related to performance engineering (dynamic analysis), software visualization, and computer graphics. Along with teaching... Read More →
Tuesday September 17, 2024 14:00 - 15:00 MDT
Cottonwood 8/9

15:15 MDT

Unraveling string_view: Basics, Benefits, and Best Practices
Tuesday September 17, 2024 15:15 - 16:15 MDT
In the world of C++, efficient string handling is crucial for performance-critical applications. Enter string_view, a lightweight view into character sequences. In this talk, we’ll explore the fundamentals of string_view, its advantages over traditional string, how it compares to std::span, common pitfalls to avoid, and practical case studies for using it effectively. Whether you’re a beginner or an intermediate developer, join us to enhance your code’s performance and adopt better practices.
Speakers
JL

Jasmine Lopez

Software Engineer, Microsoft
PO

Prithvi Okade

Software Engineer, Microsoft
Tuesday September 17, 2024 15:15 - 16:15 MDT
Cottonwood 8/9

16:45 MDT

Using Modern C++ to Build XOffsetDatastructure: A Zero-Encoding and Zero-Decoding High-Performance Serialization Library in the Game Industry
Tuesday September 17, 2024 16:45 - 17:45 MDT
XOffsetDatastructure is a serialization library designed to reduce or even eliminate the performance consumption of serialization and deserialization in the game industry by utilizing zero-encoding and zero-decoding. It is also a collection of high-performance data structures designed for efficient read and in-place/non-in-place write, with performance comparable to STL. 

Custom allocators are used to keep fields in contiguous memory, enabling them to be sent directly. Offset pointers are used to maintain pointer validity after buffer resizing and memory movement caused by modifications to variable-size fields. Some other techniques, such as containers that support offset pointers and auto-resizing mechanisms, are involved.

The performance statistics demonstrate that XOffsetDatastructure is a high-performance library, offering advantages in terms of encoding and decoding time, read and write performance, and message size compared to other modern C++ serialization libraries.
Speakers
avatar for Fanchen Su

Fanchen Su

Fanchen Su is a game research & development expert and team leader. He has over 20 years of experience in designing, writing, and maintaining C++ code. His main areas of interest and expertise are modern C++, code performance, low latency, and maintainability. He graduated from Wuhan... Read More →
Tuesday September 17, 2024 16:45 - 17:45 MDT
Cottonwood 8/9
 
Share Modal

Share this link via

Or copy link

Filter sessions
Apply filters to sessions.
Filtered by Date -