
Boost Performance with APL Workshop Insights
Explore key insights from the Performance Workshop Dyalog 22 by Aaron Hsu, covering topics on theory, factors affecting performance, implementation strategies, and more. Understand concepts like Big-O families, run-time memory usage, and data structures for enhancing computational efficiency.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Performance Workshop Dyalog 22 Aaron Hsu - aaron@dyalog.com
Theory Physical Implementation
The Comp. Sci. of APL Performance
Simplified Reasoning
Big-O Families
Constant: Log-Linear: Linear: Polynomial: O(n*k) Exponential: O(k*n) O(k) O(n n) O(n)
Theoretical Factors of Performance
Run time Memory Usage Memory Access Locality/Caching Parallelism/Critical Path Throughput/Bandwidth Overheads
Physical Factors of Performance
How many elements? How many bits? How many times? How many?
How much data do you have?
Implementation Factors for Performance
Platform Runtime Execution Model
The Array Data Structure
<Array Structure Diagram>
Code Data Structure
Token Stream
Variable Lookup
Auxiliary Structures
Caching/ Hashtables
Idiomatic APL and Automatic Performance Analysis
]RunTime ]SpaceNeeded
f0 {+} f1 {(1 ) 2- 0,(1 ,1) + } f2 {(1 ) (+ ){+ } } f3 {1 x x[+ ]+ x 0 1++ }
Memory Management
Lets look at some tricks
Vs. Hashed Primitives
Inverted Tables
When not to use inverted tables?
Flat/Nested Recursive ADTs
Calculate space of a tree
More Code to Play with
Brians Code
Basic Rules of Thumb
Flat Small Primitive Parallel
Where can APL outperform traditional languages? How?