MATLAB Performance Tuning and Acceleration


Course Number: MTLB-112
Duration: 1 day (6.5 hours)
Format: Live, hands-on

MATLAB Performance Tuning and Acceleration Overview

This intermediate-level MATLAB Performance Tuning and Acceleration training course teaches attendees how to improve the run-time performance (speed) of their MATLAB programs. Students learn how to leverage tools for profiling and measuring performance. In addition, students learn a wide variety of speedup techniques, including loop optimization, data caching and chunking, I/O optimization, mathematical/physical identities, storage type modifications, compiled (binary) code, vectorization, parallelization, graphics, memory-related techniques, and more.

Note: This course can be condensed to a half-day with fewer examples and less hands-on practice. We strongly recommend the full-day version if possible.

Location and Pricing

This course is taught as a private, live online class for teams of 3 or more. All our courses are hands-on, instructor-led, and tailored to fit your group’s goals and needs. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for online corporate training, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Understand tradeoffs in performance and cost-effectiveness of MATLAB code
  • Learn how to measure and profile MATLAB’s run-time performance
  • Discover top performance hotspots/bottlenecks in run-time code
  • Acquire soft-skills such as knowing when to optimize and when not to bother
  • Discover multiple possible ways of improving MATLAB run-time speed
  • Understand memory’s effects on performance, and how to use this information
  • Write MATLAB code that is highly performant and responsive
  • Learn how to improve perceived speedup when actual speedup is not possible

Prerequisites

Attendees should have taken Accelebrate's From MATLAB Scripts to Complete Programs course or have equivalent knowledge. Students should already be comfortable using the MATLAB environment and have at least basic MATLAB programming experience.

Outline

Expand All | Collapse All

Introduction
Profiling MATLAB Performance
  • When to profile and when not to bother
  • When should we stop optimizing the code?
  • Profiling techniques
  • Real-time profiling limitations
  • MATLAB’s JIT and its effect on profiling
  • Trade-offs: performance, maintainability, robustness, development cost, etc.
  • Vertical vs. horizontal scalability
Standard Programming Techniques
  • Loop optimizations
  • Caching data
  • Smart checks bypass
  • Exception handling and performance
  • Sizing data sets
  • Inlining code
  • Externally-connected systems
  • Perceived vs. actual performance
  • Using mathematical identities
MATLAB-Specific Techniques
  • Using different storage types
  • Object-orient MATLAB and performance
  • Using internal helper functions
  • Strings and dates/times
  • MATLAB’s Startup Accelerator
Using Binary Code
  • Mex
  • MATLAB Compiler vs. MATLAB Coder
  • 3rd-party libraries
I/O Speedup Techniques
  • XLS/CSV read/write
  • Binary vs. text format
  • Reducing disk access
  • Buffered, consolidated and chunked I/O
Vectorization and Parallelization Techniques
  • Vertical vs. horizontal scaling
  • Parallelization mechanisms in MATLAB
  • Vectorization
  • Explicit parallelization
  • Amdahl’s Law
  • Using the GPU
Graphics and GUI Techniques
  • Initial graphs creation
  • Updating graphs in real-time
  • GUI preparation
  • GUI responsiveness
  • Feedback for long-duration tasks
  • Dynamic updates/refresh
  • Asynchronous updates/refresh
  • Avoiding common pitfalls
Memory-Related Techniques
  • Why memory affects performance
  • Profiling memory usage in MATLAB
  • MATLAB’s memory storage
  • Optimizing loop ordering
  • Pre-allocation of data
  • Minimizing run-time memory allocations
  • In-place data manipulations
  • Using global and persistent variables
Conclusion

Training Materials

All MATLAB training students will receive comprehensive courseware.

Software Requirements

  • Any Windows, Linux, or macOS operating system
  • A recent version of MATLAB


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan