Librería Portfolio Librería Portfolio

Búsqueda avanzada

TIENE EN SU CESTA DE LA COMPRA

0 productos

en total 0,00 €

ACCELERATING MATLAB PERFORMANCE. 1001 TIPS TO SPEED UP MATLAB PROGRAMS
Título:
ACCELERATING MATLAB PERFORMANCE. 1001 TIPS TO SPEED UP MATLAB PROGRAMS
Subtítulo:
Autor:
ALTMAN, Y
Editorial:
CRC
Año de edición:
2014
Materia
MATLAB
ISBN:
978-1-4822-1129-0
Páginas:
785
99,50 €

 

Sinopsis

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 both the application of standard industry techniques in MATLAB, as well as methods that are specific to MATLAB such as using different data types or built-in functions.

The book covers 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.



1. Introduction to Performance Tuning

1.1 Why Should We Bother?

1.2 When to Performance-Tune and When Not to Bother

1.3 The Iterative Performance Tuning Cycle

1.3.1 Pareto's Principle and the Law of Diminishing Returns

1.3.2 When to Stop Tuning

1.3.3 Periodic Performance Maintenance

1.4What to Tune

1.5Performance Tuning Pitfalls

1.5.1 When to Tune

1.5.2 Performance Goals

1.5.3 Profiling

1.5.4 Optimization

1.6 Performance Tuning Tradeoffs

1.7 Vertical versus Horizontal Scaling

1.8 Perceived versus Actual Performance

1.8.1 Presenting Continuous Feedback for Ongoing Tasks

1.8.2 Placing the User in Control

1.8.3 Enabling User Interaction during Background Processing

1.8.4 Streaming Data as it Becomes Available

1.8.5 Streamlining the Application

1.8.6 Reducing the Run-Time Variability

1.8.7 Performance and Real Time

2. Profiling MATLAB® Performance

2.1 The MATLAB Profiler

2.1.1 The Detailed Profiling Report

2.1.2 A Sample Profiling Session

2.1.3 Programmatic Access to Profiling Data

2.1.4 Function-Call History Timeline

2.1.5 CPU versus Wall-Clock Profiling

2.1.6 Profiling Techniques

2.1.6.1 Relative versus Absolute Run Times

2.1.6.2 Ensuring Profiling Consistency

2.1.6.3 Ensuring Compatibility with Real-World Conditions

2.1.6.4 Profiling GUI and I/O

2.1.6.5 Code Coverage

2.1.7 Profiling Limitations

2.1.8 Profiling and MATLAB's JIT

2.2 tic, toc and Relatives

2.2.1 The Built-In tic, toc Functions

2.2.2 Comparison between the Profiler and tic, toc

2.2.3 Related Tools

2.3 Timed Log Files and Printouts

2.4 Non-MATLAB Tools

3. Standard Performance-Tuning Techniques

3.1 Loop Optimization

3.1.1 Move Loop-Invariant Code Out of the Loop

3.1.1.1 A Simple Example

3.1.1.2 I/O and Memory-Related Invariants

3.1.1.3 Subexpression Hoisting

3.1.1.4 Loop Conditionals

3.1.1.5 Invoked Functions

3.1.2 Minimize Function Call Overheads

3.1.3 Employ Early Bail-Outs

3.1.4 Simplify Loop Contents

3.1.5 Unroll Simple Loops

3.1.6 Optimize Nested Loops

3.1.7 Switch the Order of Nested Loops

3.1.8 Minimize Dereferencing

3.1.9 Postpone I/O and Graphics Until the Loop Ends

3.1.10 Merge or Split Loops

3.1.11 Loop Over the Shorter Dimension

3.1.12 Run Loops Backwards

3.1.13 Partially Optimize a Loop

3.1.14 Use the Loop Index Rather than Counters

3.1.15 MATLAB's JIT

3.2 Data Caching

3.2.1 Read-Only Caches

3.2.2 Common Subexpression Elimination

3.2.3 Persistent Caches

3.2.3.1 In-Memory Persistence

3.2.3.2 Non-Memory Persistence

3.2.4 Writable Caches

3.2.4.1 Initializing Cache Data

3.2.4.2 Memoization

3.2.4.3 Multilayered (Offline) Cache

3.2.5 A Real-Life Example: Writable Cache

3.2.6 Optimizing Cache Fetch Time

3.3 Smart Checks Bypass

3.4 Exception Handling

3.5 Improving Externally Connected Systems

3.5.1 Database

3.5.1.1 Design

3.5.1.2 Storage

3.5.1.3 Indexing

3.5.1.4 Driver and Connection

3.5.1.5 SQL Queries

3.5.1.6 Data Updates

3.5.2 File System and Network

3.5.3 Computer Hardware

3.6 Processing Smaller Data Subsets

3.6.1 Reading from a Database

3.6.2 Reading from a Data File

3.6.3 Processing Data

3.7 Interrupting Long-Running Tasks

3.8 Latency versus Throughput

3.8.1 Lazy Evaluation

3.8.2 Prefetching

3.9 Data Analysis

3.9.1 Preprocessing the Data

3.9.2 Controlling the Target Accuracy

3.9.3 Reducing Problem Complexity

3.10 Other Techniques

3.10.1 Coding

3.10.1.1 Recursion

3.10.1.2 Using Known Computational Identities

3.10.1.3 Remove Unnecessary Computations (´Dead-Code´ Elimination)

3.10.1.4 Optimize Conditional Constructs

3.10.1.5 Use Short-Circuit Conditionals (Smartly!)

3.10.1.6 Multiply Rather than Divide (or Not)

3.10.2 Data

3.10.2.1 Optimize the Processed Data

3.10.2.2 Select Appropriate Data Structures

3.10.2.3 Utilize I/O Data Compression

3.10.3 General

3.10.3.1 Reduce System Interferences

3.10.3.2 Self-Tuning

3.10.3.3 Jon Bentley's Rules

4. MATLAB®-Specific Techniques

4.1 Effects of Using Different Data Types

4.1.1 Numeric versus Nonnumeric Data Types

4.1.2 Nondouble and Multidimensional Arrays

4.1.3 Sparse Data

4.1.4 Modifying Data Type in Run Time

4.1.5 Concatenating Cell Arrays

4.1.6 Datasets, Tables, and Categorical Arrays

4.1.7 Additional Aspects

4.2 Characters and Strings

4.2.1 MATLAB's Character/Number Duality

4.2.2 Search and Replace

4.2.3 Converting Numbers to Strings (and Back)

4.2.4 String Comparison

4.2.5 Additional Aspects

4.2.5.1 Deblanking

4.2.5.2 Concatenating Strings

4.2.5.3 Converting Java Strings into MATLAB

4.2.5.4 Internationalization

4.3 Using Internal Helper Functions

4.3.1 A Sample Debugging Session

4.4 Date and Time Functions

4.5 Numeric Processing

4.5.1 Using inf and NaN

4.5.2 Matrix Operations

4.5.3 Real versus Complex Math

4.5.4 Gradient

4.5.5 Optimization

4.5.6 F