Tag: compiler

Understanding C++ Coroutines by Example: Generators (Part 1 of 2) – Pavel Novikov – CppCon 2022

  • Lobby
  • Tag Archives: compiler

https://cppcon.org/
---

Understanding C++ Coroutines by Example: Generators (Part 1 of 2) - Pavel Novikov - CppCon 2022
https://github.com/CppCon/CppCon2022

Coroutines are a powerful tool added to C++20. There are no out-of-the-box facilities in the standard library that are user friendly and immediately usable, although there are plenty of libraries out there already providing such primitives.

Also there are now best practices regarding usage of coroutines in C++ that emerged while people were learning them, and that programmers should know about.

This time we will concentrate on the generators part of the coroutines.
We'll get up to speed with how coroutines work under the hood, and then learn about the co_yield keyword, and how simple generators and asynchronous generators conceptually work.

Note: this session is part 1 of a series of talks. They cover separate aspects of coroutines and are designed to be mostly independent. You can watch part 2 here: https://youtu.be/lz3F036_OvU
---

Pavel Novikov

Got an engineering degree in missilery from BMSTU (Moscow).

Loves C++ and knows how to cook it.

Likes metaprogramming, multithreading and asynchronous programming, coroutine adoption enthusiast.
__

Videos Streamed, Edited, and YouTube Channel Managed by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #coroutines

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

The Hidden Performance Price of C++ Virtual Functions – by Ivica Bogosavljevic – CppCon 2022

  • Lobby
  • Tag Archives: compiler

https://cppcon.org/
---

The Hidden Performance Price of C++ Virtual Functions - Ivica Bogosavljevic - CppCon 2022
https://github.com/CppCon/CppCon2022

Virtual function mechanism is one of the core concepts of C++, however, it does come with a performance price. But how high is that price? In this talk we are going to dissect virtual functions to understand when they are slow and why they are slow. We will investigate how well virtual functions use the CPU's underlying resources and how good is the compiler at optimizing virtual functions. We will also present several techniques to help you speed up your program using virtual functions.
---

Ivica Bogosavljevic

Senior Software Engineer with 10 years of experience active in the domain of Linux and bare-metal embedded systems. His professional focus is application performance improvement - techniques used to make your C/C++ program run faster by using better algorithms, better exploiting the underlying hardware, and better usage of the standard library, programming language, and the operating system. Writer for a performance-related tech blog: https://johnysswlab.com]
---

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

#cppcon #programming #functions

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

Compilation Speedup Using C++ Modules: A Case Study – Chuanqi Xu – CppCon 2022

  • Lobby
  • Tag Archives: compiler

https://cppcon.org/
---

Compilation Speedup Using C++ Modules: A Case Study - Chuanqi Xu - CppCon 2022
https://github.com/CppCon/CppCon2022

The presentation will show a series of experimental results to (try to) answer the interesting and hard question: how much speedup we could get if we use C++20 Modules? We will compare the compilation time of a modularized library with its original implementation in many different compiling configurations (Optimization Levels, Debug Informations and other compiler techniques). Then we would discuss the reasons behind the numbers. And we will discuss the possible optimization techniques in the future to speedup the compilation process more and the corresponding impact on performance, code sizes, object ABI and language standard.

Q: What will I learn? and Why is this important to me?

You will find the improvements of C++20 modules for a real world project. It may be helpful for your future decision on C++20 modules. (For example, should we use it? How much benefit could we get actually?)

Q: Will it include a quick recap of modules or is that knowledge a prerequisite from the audience?

It will include a quick recap of modules.

Q: What is the compiler used?

We use clang in our experiments.

Q: What is the build system used?

We use a hand written makefile to build the modules.

Q: Will it talk about the lessons learned in refactoring to modules?

No. We don't focus on specific grammars.
---

Chuanqi Xu

A compiler engineer for Clang/LLVM who focus on both frontend/middle-end. Maintaining Coroutines parts in Clang/LLVM. Implementer/User of Coroutine libraries. Implementing/Using C++20 Named Modules.
__

Videos Streamed, Edited, and YouTube Channel Managed by Digital Medium: http://online.digital-medium.co.uk

#cppcon #programming #compilation

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