What You Learned

In this chapter, you learned some basic tips for optimizing your genetic algorithms. You also learned how to decide when to optimize and that it’s often unnecessary to optimize on modern machines. You used benchmarking and profiling tools to establish baselines and determine where to optimize.

You then went through some basic optimization tips and the order in which to try them. You also learned some basic tips for writing faster Elixir and improving the performance of your algorithms.

Next, you learned how parallelization can be used to speed up the performance of your algorithms under certain conditions. You learned when it’s best to try and parallelize your algorithms and when it’s best to avoid it.

Finally, you learned about NIFs and where you can use NIFs to see performance gains.

Remember, the optimization tips you learned about in this chapter should generally be worked through in the order they were presented here. Start by determining if optimization is even necessary, and then go through some investigative work to establish baselines and determine where you need to optimize. Next, attempt to optimize your Elixir code. After that, you should see if your algorithms would benefit from parallelism in certain places. Finally, if you need to, you can see if NIFs would speed up the performance of some of your functions.

In the next chapter, you’ll build up the resiliency of your genetic algorithm framework by learning how to test and analyze the correctness of the code you’ve written so far.

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

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