Skip to content

Commit

Permalink
Chapter 0 edits
Browse files Browse the repository at this point in the history
I think you might want to provide example texts on
architecture and operating systems. "Data-center" is
written "data center". Your use of "well-known" is
a postpositive and thus ought be written "well known".
I converted a few comma splices to semicolons. Fixed
a few number problems.

It would be great if I could break these long lines
into shorter ones -- the edits will definitely be
easier to manage for you, I think.
  • Loading branch information
dankamongmen committed Sep 4, 2024
1 parent d09f798 commit 41464f9
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions chapters/0-Preface/0-2 Preface.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## About The Author {.unlisted .unnumbered}

Denis Bakhvalov is a performance engineer at Intel, where he works on optimizing various widespread production applications and benchmarks. Before that, he was a part of the Intel compiler team, that develops C++ compilers for a variety of different architectures. Denis started his career as a software developer in 2008, working on a large C++ enterprise financial application. Before joining Intel, he worked for three years at Nokia, where he was writing embedded software.
Denis Bakhvalov is a performance engineer at Intel, where he works on optimizing various widespread production applications and benchmarks. Before that, he was a part of the Intel compiler team, that develops C++ compilers for a variety of different architectures. Denis started his career as a software developer in 2008, working on a large C++ enterprise financial application. Before joining Intel, he worked for three years at Nokia, where he was writing embedded software.

Performance engineering and compilers were always among his primary interests. In 2016 Denis started his `easyperf.net` blog, writing about low-level performance optimizations, C/C++ compilers, and CPU microarchitecture. Away from work, Denis enjoys soccer, chess, and traveling.

Expand All @@ -14,36 +14,37 @@ Contacts:

## From The Author {.unlisted .unnumbered}

I started this book with a simple goal: educate software developers to better understand their applications' performance. I know how difficult the topic of low-level performance engineering might be for a beginner or even for an experienced developer. I remember the days when I was starting with performance analysis. I was looking at unfamiliar metrics trying to match the data that didn't match. And I was baffled. It took me years until it finally "clicked", and all pieces of the puzzle came together... even though sometimes I still struggle with the same problems.
I started this book with a simple goal: educate software developers to better understand their applications' performance. I know how difficult the topic of low-level performance engineering might be for a beginner or even for an experienced developer. I remember the days when I was starting with performance analysis. I was looking at unfamiliar metrics trying to match data that didn't match, and I was baffled. It took me years until it finally "clicked", and all pieces of the puzzle came together... even though sometimes I still struggle with the same problems.

When I was making my first steps in performance engineering, the only good source of information on the topic was software developer manuals, which are not what mainstream developers like to read. Frankly, I wish I had this book when I was trying to learn low-level performance analysis. In 2016 I started sharing things that I learned on my blog and received some positive feedback from my readers. Some of them suggested me to aggregate this information into a book. This book is their fault.
When I was taking my first steps in performance engineering, the only good sources of information on the topic were software developer manuals, which are not what mainstream developers like to read. Frankly, I wish I had this book when I was trying to learn low-level performance analysis. In 2016 I started sharing things that I learned on my blog, and received some positive feedback from my readers. Some of them suggested I aggregate this information into a book. This book is their fault.

Many people have asked me why I decided to self-publish the book. In fact, I initially tried to pitch it to several reputable publishers, but they didn't see the financial benefits of making such a book. However, I really wanted to write it, so I decided to do it anyway. In the end, it turned out quite well, so I decided to self-publish the second edition as well.
Many people have asked me why I decided to self-publish the book. In fact, I initially tried to pitch it to several reputable publishers, but they didn't see the financial benefits of making such a book. However, I really wanted to write it, so I decided to do it anyway. In the end, it turned out quite well, so I decided to self-publish the second edition also.

The first edition was released in November 2020. It was well-received by the community, however, I also received a lot of constructive criticism. The most popular feedback was to include exercises for experimentation. Some readers complained that it was too focused on Intel CPUs and didn't cover other architectures like AMD, ARM-based CPUs, etc. Other readers suggested that I should cover system-level performance, not just CPU performance. The second edition expands in all these and many other directions. It came out to be twice as big as the first book.
The first edition was released in November 2020. It was well-received by the community, but I also received a lot of constructive criticism. The most popular feedback was to include exercises for experimentation. Some readers complained that it was too focused on Intel CPUs and didn't cover other architectures like AMD, ARM, etc. Other readers suggested that I should cover system performance, not just CPU performance. The second edition expands in all these and many other directions. It came out to be twice as big as the first book.

Specifically, I want to highlight the exercises that I added to the second edition of the book. I created a supplementary online course "Performance Ninja", which has more than 20 lab assignments. You can use these small puzzles to practice optimization techniques and check your understanding of the material. I consider it the best part that differentiates this book from others. I hope it will make your learning process more entertaining. More details about the online course can be found in [@sec:chapter1Exercises].
Specifically, I want to highlight the exercises that I added to the second edition of the book. I created a supplementary online course "Performance Ninja" with more than twenty lab assignments. Use these small puzzles to practice optimization techniques and check your understanding of the material. I consider it the best part that differentiates this book from others. I hope it will make your learning process more entertaining. More details about the online course can be found in [@sec:chapter1Exercises].

Low-level performance optimizations are not easy, I know it first-hand. I tried to explain everything as clearly as possible, however the topic is very complex. It requires a fair amount of experimentation and practice to fully understand the material. I encourage you to take your time, read through the chapters, and experiment with examples provided in the online course.
I know firsthand that low-level performance optimization is not easy. I tried to explain everything as clearly as possible, but the topic is very complex. It requires experimentation and practice to fully understand the material. I encourage you to take your time, read through the chapters, and experiment with examples provided in the online course.

I joined Intel in 2017, but even before that I never shied away from software optimization tasks. I always got a dopamine hit when I saw the running time of my program went from 10 seconds down to 1 second. That feeling of excitement of discovering something, feeling proud of yourself. It made me even more curious and craving for more. I've been doing performance-related work a lot more chaotic back then. Now I do it more professionally, however, I still feel very happy when I make the software run faster. I wish you too experience the joy of discovering performance issues in your application and the satisfaction of fixing them.
I joined Intel in 2017, but even before that I never shied away from software optimization tasks. I always got a dopamine hit when I reduced the running time of my program from ten seconds to one second. The excitement of discovering something and feeling proud left me even more curious, always craving for more. My initial performance work was amateurish and undirected. Now it is my profession, yet I still feel very happy when I make software run faster. I hope you also experience the joy of discovering performance issues, and the satisfaction of fixing them.

I sincerely hope that this book will help you learn low-level performance analysis, and, if you make your application faster as a result, I will consider my mission accomplished.
I sincerely hope that this book will help you learn low-level performance analysis. If you make your application faster as a result, I will consider my mission accomplished.

You will find that I use "we" instead of "I" in many places in the book. This is because I received a lot of help from other people. The full list of contributors can be found at the end of the book in the "Acknowledgements" section.

The PDF version of this book and the "Performance Ninja" online course are available for free. This is my way to give back to the community.

## Target Audience {.unlisted .unnumbered}

If you're working with performance-critical applications, this book is right for you. It is primarily targeted at software developers in High-Performance Computing (HPC), AI, game development, data-center applications (like Facebook, Google, etc.), High-Frequency Trading (HFT), and other industries where the value of performance optimizations is well-known and appreciated.
If you're working with performance-critical applications, this book is right for you. It is primarily targeted at software developers in High-Performance Computing (HPC), AI, game development, data center applications (like those at Facebook, Google, etc.), High-Frequency Trading (HFT), and other industries where the value of performance optimizations is well known and appreciated.

This book will also be useful for any developer who wants to understand the performance of their application better and to know how it can be diagnosed and improved. You may just be enthusiastic about performance engineering and want to learn more about it. Or you may want to be the smartest engineer in the room, that's also fine. I hope that the material presented in this book will help you develop new skills that can be applied in your daily work and potentially move your career forward.
This book will also be useful for any developer who wants to understand the performance of their application better and know how it can be improved. You may just be enthusiastic about performance engineering and want to learn more about it. You may want to be the smartest engineer in the room; that's also fine. I hope that the material presented in this book will help you develop new skills that can be applied in your daily work and potentially move your career forward.

Readers are expected to have a minimal background in C/C++ programming languages to understand the book's examples. The ability to read basic x86/ARM assembly is desired but is not a strict requirement. I also expect familiarity with basic concepts of computer architecture and operating systems like central processor, memory, process, thread, virtual and physical memory, context switch, etc. If any of the mentioned terms are new to you, I suggest studying this material first.
A minimal background in the C and C++ programming languages is necessary to understand the book's examples. The ability to read basic x86/ARM assembly is desirable, but not a strict requirement. I also expect familiarity with basic concepts of computer architecture and operating systems like "CPU", "memory", "process", "thread", "virtual" and "physical memory", "context switch", etc. If any of these terms are new to you, I suggest studying these prerequisites first.

I suggest you read the book chapter by chapter, starting from the beginning. If you consider yourself a beginner in performance analysis, I do not recommend skipping chapters. After you finish reading, you can use this book as a source of ideas whenever you face a performance issue and it's not immediately clear how to fix it. You can skim through the second part of the book to see which optimization techniques can be applied to your code.
I suggest you read the book chapter by chapter, starting from the beginning. If you consider yourself a beginner in performance analysis, I do not recommend skipping chapters. After you finish reading, you can use this book as a source of ideas whenever you face a performance issue and are unsure how to fix it. You can skim through the second part of the book to see which optimization techniques can be applied to your code.

[TODO]: put a link to an errata webpage
[TODO]: supply links to prerequisite material (H&P, Tanenbaum(?))
[TODO]: put a link to an errata webpage

\sectionbreak

0 comments on commit 41464f9

Please sign in to comment.