Performance Patterns

This chapter includes patterns related to improving system performance. High performance is a major requirement in scientific computing, artificial intelligence, machine learning, and big data processing. Why is that? 

In the past decade, data has grown almost exponentially thanks to the scalability from the cloud. Think about the Internet of Things (IoT). Sensors are all around us—home security systems, personal assistants, and even room temperature controls are collecting tons of data continuously. Furthermore, the data being collected is stored and analyzed by companies that want to build smarter products. Use cases such as these demand more computing power and speed.

I once debated with a colleague about the use of cloud technologies for solving computationally intensive problems. Computing resources are definitely available in the cloud, but they are not free. It is therefore quite important that computer programs are designed to be more efficient and optimized to avoid unnecessary costs in the cloud. 

Fortunately, the Julia programming language allows us to easily utilize CPU resources to the fullest extent. The way to make things fast is not difficult as long as some rules are followed. The online Julia reference manual already contains some tips. This chapter provides further patterns that are used extensively by veteran Julia developers to increase performance. 

We will go over the following design patterns:

  • Global constant
  • Struct of arrays
  • Shared arrays
  • Memoization
  • Barrier function

Let's get started!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.109.141