The aim of this book is to show us how to improve the performance of our Julia code, but before we can improve, we must measure. To try and optimize any Julia code we have written, we first need to understand its performance characteristics. Is the code fast enough for our needs? If not, is there an upper limit to how fast it can be? And finally, can we understand where the bottlenecks are, so that we can prioritize where to focus our efforts. This chapter will show us the tools available in Julia to answer these questions and more. In later chapters, we will see how to use this information to improve our code.
In this chapter, we will cover the following topics:
- Timing Julia functions
- Accurate benchmarking
- Profiling Julia functions
- Tracking detailed memory allocation