Just-in-Time Compilation: The Next Big Thing? - Ben Deane & Kris Jusiak - CppCon 2020

preview_player
Показать описание
---
JITting code is a feature of many languages but has not yet landed in C++. However, there has been some work to integrate JITting into Clang by Hal Finkel. Having a JIT compiler offers flexibility at runtime without sacrificing compile-time performance, and can take advantage of late optimizations that maybe even better than those available at compile-time.

C++ is still in the early stages of exploring JIT capabilities. In this talk, we'll expand the boundaries and the possibilities of JITting in C++ by combining C++20 features with the clang-jit compiler work introduced in P1609. We'll show some use cases we find non-obvious and exciting and that may change the future of compile-time programming by blurring the boundary between compile-time and runtime.

---
Ben was in the game industry for 23 years, at companies like EA and Blizzard. For the last couple of years he's been working in the finance industry at Quantlab. He's always looking for useful new techniques in C++, and he geeks out on algorithms, APIs, types and functional programming.

Kris is a Senior Software Engineer passionate about programming and has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial, LLC. He has an interest in modern C++ development with a focus on performance and quality. He is an open-source enthusiast with multiple open-source libraries where he uses template meta-programming techniques to support the C++ rule - "Don't pay for what you don't use" whilst trying to be as declarative as possible with a help of domain-specific languages. Kris is also a keen advocate of extreme programming techniques, Test/Behavior Driven Development and truly believes that 'the only way to go fast is to go well!'.

---

*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

I would like to replicate the examples that you show in the talk and expand on them. Is there any repo for this?

PeterRautek
Автор

I think that at 10:49 the name of the sequence should be JITING or JITIN instead GTIN. That was really interesting even 2 years later!

ncoccola
Автор

Whole talk is mind-blowing. Even I actually did see talk about clang-jit. Still looks so powerful magic that I could not fully imagine all useful cases (scripts/mods/etc). Not because idea is bad, but the opposite, is too good to be true :)

mapron
Автор

Does there exists anykind of github example project, which can be used to try out all the functionalities of [[clang::jit]] ?

tpikaro
Автор

You talking several times that modules might help with lambda body limitation. But module declarations/imports can be only at top level too...

mapron
Автор

JIT is incredibly good during the development phase when the idea is not solid yet, but once the program needs to be released, ahead of time compilation is preferred. So, in my opinion, a combination of both approaches (JIT for development and AOT for release) will have the bests of both worlds.
The reason is that JIT does not have performance benefits for production release. Most of the time the JIT compilation time, which is now part of the runtime, is worse than the original runtime! In any serious embedded application, JIT will be either impossible or cumbersome. To understand what I mean just check the people's feedback on JIT in other languages that use it (e.g Julia, C#, etc).

nivo