Type Here to Get Search Results !

Accelerating MATLAB Performance by Yair M. Altman in pdf

 

Download this PDF Book: Accelerating MATLAB Performance: 1001 tips to speed up MATLAB programs 1st Edition by Yair M. Altman

The MATLAB® programming environment is often perceived as a platform suitable for prototyping and modeling but not for "serious" applications. One of the main complaints is that MATLAB is just too slow.

Accelerating MATLAB Performance aims to correct this perception by describing multiple ways to greatly improve MATLAB program speed. Packed with thousands of helpful tips, it leaves no stone unturned, discussing every aspect of MATLAB.

Ideal for novices and professionals alike, the book describes MATLAB performance in a scale and depth never before published. It takes a comprehensive approach to MATLAB performance, illustrating numerous ways to attain the desired speedup.

The book covers MATLAB, CPU, and memory profiling and discusses various tradeoffs in performance tuning. It describes the application in MATLAB of standard tuning techniques used in the software industry, as well as methods that are specific to MATLAB such as using different data types or built-in functions. 

The book discusses MATLAB vectorization, parallelization (implicit and explicit), optimization, memory management, chunking, and caching. It explains MATLAB's memory model and details how it can be leveraged. 

It describes the use of GPU, MEX, FPGA, and other forms of compiled code, as well as techniques for speeding up deployed applications. It details specific tips for MATLAB GUI, graphics, and I/O. It also reviews a wide variety of utilities, libraries, and toolboxes that can help to improve performance.

Sufficient information is provided to allow readers to immediately apply the suggestions to their own MATLAB programs. Extensive references are also included to allow those who wish to expand the treatment of a particular topic to do so easily.

Supported by an active website and numerous code examples, the book will help readers rapidly attain significant reductions in development costs and program run times.

Review

… a very interesting new book on MATLAB® performance … covering basic tools and an appropriate range of specific programming techniques. The book seems to take a whole-system approach … helping readers understand the big picture of how to get better performance.

―Michelle Hirsch, Ph.D., Head of MATLAB® Product Management, The MathWorks Inc.

The MATLAB® programming environment is often perceived as a platform suitable for prototyping and modeling but not for actual real-life applications. One of the reasons that I constantly hear when consulting with clients is that “MATLAB is slow”. This book aims to help reduce this perception and shows that MATLAB programs can in fact be made to run extremely fast, in a wide variety of different ways. 

 MathWorks, who develop MATLAB, invests a signiicant amount of R&D effort in con- stantly improving MATLAB’s performance and advocating best practices for improved performance.1 Postings for performance-related R&D jobs are periodically posted2 and the engine’s performance improves with almost every semi-annual MATLAB release. 

In fact, the same MATLAB programs that might have been slow 10 or more years ago may now be blazingly fast when run using the latest MATLAB release, on the very same platform. Using programming techniques presented in this book, MATLAB applications can be made even faster, fast enough for most uses. 

This enables signiicant reduction of the development time and cost, since we can use MATLAB from end to end, from prototyping to deployment, without having to maintain a mirror code–base using a different program- ming language and environment. 

So, the perception of MATLAB as a slow environment may at least partly be due to a combination of factors, ranging from negative experience from past releases, to application code that does not follow good programming practices. 

Some people say that when performance is really important, we should use a different programming language such as C/C++. While using C/C++ can certainly improve perfor- mance if done correctly, it is not a general panacea. 

MATLAB provides many beneits that could be very important during both development (e.g., rapid application development, short development cycles, ease of use, lenient environment, gentle learning curve) and run time (e.g., built-in vectorization, simple parallelization, automated memory management, and JIT optimizations). 

This is the reason we use High-Level Languages in the irst place, trading some performance for functionality, development time, and so on. Otherwise, we would program in Assembly, use FPGAs, or even develop custom ASIC chips for top performance. . . . Using MATLAB does not however mean that we should abandon performance alto- gether. 

This book shows that using some very easy-to-follow techniques we can signii- cantly improve MATLAB code speed without sacriicing MATLAB’s beneits. Some authors who write about performance like to demonstrate ideas with colorful graphs that show the performance behavior as a function of one or more parameters. Such comparisons are often academic in nature. 

This book tries to take a more practi- cal approach with the presented recommendations. The ideas are explained verbally and short code snippets are often included to illustrate the point, usually without a rigorous comparison of all the parameter variants. 

This is not a PhD thesis, but rather a practical hands-on book intended for day-to-day use by engineers. On one hand, enough information is provided to enable engineers to immediately apply the suggestions to their MATLAB programs. 

On the other hand, many references are also provided to enable readers who wish to expand the treatment of a particular topic to easily do so. There is always a delicate line between providing too much and too little informa- tion in the main text, so I hope my choices were adequate.

Performance is a term that can refer to many things, from functional (“Does it perform well enough?”) to speed (“Does it perform fast enough?”). In this book we are interested in only the latter aspect: speed. Other aspects of performance (accuracy, stability, robustness, etc.) are not less important, but are outside the scope of this text. 

If this book may seem verbose at times, this is because I have tried to explain the rea- sons behind the recommendations, in the hope that users will gain insight. After all, this book cannot cover every possible aspect in all possible situations; gaining insight will enable readers to search for other ways to tune their speciic program.

Naturally, not all the numerous individual speedup suggestions can be remembered. But in my experience, once we understand and internalize the reasoning, we naturally “rediscover” these tech- niques whenever we come across a situation that merits them. 

This book contains a wide variety of suggestions. Some may not be relevant for a spe- ciic application, or we may decide not to use them for some reason (e.g., due to their extra development and/or maintenance cost). Do not despair—plenty of other suggestions are available that could be helpful. 

There are many ways to achieve our target performance goals, so even if one technique fails, there are alternatives that we could try. In fact, there are so many different ways to achieve these goals that we can take a pick based on aes- thetic preferences and subjective experience: 

Some people use vectorization, others like parallelization, some others prefer to invest in smarter algorithms, others trade memory for performance, still others display a GUI that gives the impression of being fast. All of these routes and more are valid alternatives for making a program answer user expectations of speed and responsiveness. 

Moreover, it is expected that readers will become more proicient in eficient programming techniques, such that their programs will run faster in the irst place, even before any tuning is actually done. The book is meant as a generic reference for MATLAB performance tuning. 

As such, it does not include detailed discussion of domain-speciic topics such as numerical analy- sis, optimization, statistics, algorithms, or image processing. These topics are well worth discussing for performance aspects, but they too are outside the scope of this book. 

Some discussion is included, but is not intended to be comprehensive nor detailed. Interested readers are referred to dedicated works on these speciic topics.

About the author:

Yair M. Altman

Yair Altman, author of the extremely popular UndocumentedMatlab.com website, is well-respected in the Matlab community as a world-class Matlab expert, and the de-facto guru on undocumented Matlab features and the Matlab-Java interface in particular. His utilities are the most highly rated and frequently downloaded on Matlab's File Exchange.

Yair holds a BSc in Physics and an MSc in Computer Science, both with high honors. Having 25 years of programming experience at various levels of responsibility, he currently consults for Matlab development projects.

Yair's many years of contribution on the Matlab (CSSM) forum and his website, including a multitude of useful tips never before published, are now available in his highly-readable books.

Contents at a Glance:

1. Introduction to Performance Tuning 

2. Proiling MATLAB® Performance 

3. Standard Performance-Tuning Techniques 

4. MATLAB®-Speciic Techniques 

6. Explicit Parallelization Using MathWorks Toolboxes 

7. Explicit Parallelization by Other Means

8. Using Compiled Code 

9. Memory-Related Techniques 

10. Graphics and GUI 

11. I/O Techniques

About the book:

Publisher ‏ : ‎ Chapman and Hall/CRC; 1st edition (December 11, 2014)

Language ‏ : ‎ English

Pages ‏ : ‎ 785 

File : PDF, 35MB

Download

Free Download the Book: Accelerating MATLAB Performance by Yair M. Altman

PS: Share the link with your friends

If the Download link is not working, kindly drop a comment below, so we'll update the download link for you.

Happy downloading!

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.