***NEW: The Fastest Run-time is Compile Time: Taking Advantage of `constexpr` and Templates

SEMINAR DETAILS

  • Date: On demand
  • Duration: 9:00 am – 5:00 pm
  • Location: N.A.
  • Language: EN
  • Speaker: Jason Turner
  • Early Bird: N.A.
  • Price: N.A.
REGISTER
DETAILS (PDF)

Jason Turner IMAGE Jason Turner
Jason has 2 decades of C++ experience and is a regular conference speaker, developer, and trainer.

Contact

Phone:

+49 (0)711 138183-0

 

E-Mail:

[email protected]

T&C QA ACADEMY

Please note:
If the registration form is blocked on your system and does not open, you are welcome to register by email to [email protected]. Please indicate in the email which seminar you would like to register for, as well as your contact details and invoice address.
Thank you!

Abstract
Doing more work at compile-time means doing less work at run-time. Less work at run-time leads to faster executables. There are limits, however. Unfortunately, we cannot usually move the entire project to compile-time, as most useful programs rely on some user-provided input. In this class, you learn how to identify code that can be moved to compile-time, the limits of compile-time programming, and how to bridge the compile-time and run-time world.

Compile-time programming is more than templates and more than constexpr. With modern techniques, it is the intersection of these features.

If performance is your concern, and it probably is if you program in C++, you want to do as little work at run-time as possible. Come learn the techniques that make that possible.

Goals
Students will:

  • Learn what is possible with constexpr
  • Learn the advantages of constexpr
  • Understand how to use templates to write reusable code
  • Understand how to balance compile-time and run-time considerations

Outline
Please note: This outline is subject to change.

Introduction

  • Templates functions and classes
  • Fold expressions
  • History and background of C++ constexpr
  • Limitations of constexpr
  • Exercises for demonstrating what can or cannot be constexpr

Preparing for constexpr

  • Templates functions and classes
  • Fold expressions
  • History and background of C++ constexpr
  • Limitations of constexpr
  • Exercises for demonstrating what can or cannot be constexpr

Using constexpr

  • What is actually required to be executed at compile time?
  • Compile-time data verification
  • Creating compile-time resources
  • Utilizing compile-time resources
  • Compile-time sorting
  • Reducing compile-time impact

Prerequisites
I expect you are actively programming in C++ today and are familiar with template syntax and how templates are used.

Format
My classes are highly interactive and have small group exercises, where students share their laptops (1 laptop per 4 students) and discuss the exercise. Come expecting to interact with your fellow students and me. Come also with questions you would like answered.

Please note:
If the registration form is blocked on your system and does not open, you are welcome to register by email to [email protected]. Please indicate in the email which seminar you would like to register for, as well as your contact details and invoice address.
Thank you!