HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

High-performance Tree Wrangling, the APL Way // Aaron Hsu // Dyalog '18

Dyalog User Meetings3 HN recommenders · recommended in 3 months, 2019-2021
YouTube
6K views · 7 years ago · talk · evergreen

Aaron Hsu shows how to manipulate and transform tree data in APL using arrays and inverted tables instead of pointers. He claims much smaller code, better performance and easier parallelisation.

HN recommends it as a striking example of high-performance tree handling with array programming.

Programming language designAlgorithms & data structuresSoftware performance & optimization#apl#trees#invertedtables#arraylanguages#dyalog

3 comments from Hacker News

@jodrellblank2021 · in “Zig 0.8.0 Release Notes”

> " his saves on allocations, saves on total memory usage " Co-Dfns is Aaron Hsu's project, and he has a talk[1] on a compiler implemented in a nano-pass style, once in Racket, once in Chez Scheme[2] and once in Dyalog APL, each using CPU and GPU. For compiling an AST with ~16 million nodes, he gives benchmark figures that Dyalog APL takes 64MB RAM to hold it, Racket takes 1051MB and Chez Scheme takes 1485MB. His provocative statement for the talk is "pointers are the refined sugar of programming". The APL version is 1/50th of the lines of code[4], runs typically 9x faster on the CPU, 50x-200x faster on the GPU, despite being interpreted by Dyalog vs compiled Scheme. There are benchmarks where the APL version loses in runtime, under 1k lines of code (which he calls "tiny tiny") so lots of startup overhead and not enough big arrays to gain ground on. He has one talk (available on YouTube) about his approach to using arrays to working with tree structures in a high-performance way in APL[3]. [1] link [2] he used to be on the Scheme R6RS steering committee, so he's not new/inexperienced with it link [3] ▶ this video [4] 17 lines of code which took a PhD researcher (him) 5-10 years to write, mind you.

RecommendsView on HN
@snaky2020 · in “Language as an intellectual tool: From hieroglyphics to APL (1991)”

I had this feeling exactly listening (great, as everything Aaron does) presentation about manipulation and transformation of trees in APL, ▶ this video

RecommendsView on HN
@kadblas2019 · in “Why I think Haskell is the best general purpose language as of June 22 2019”

Qualification: I was introduced to FP a number of years ago and have finally reached a point where I feel that I have a deep understanding of FP in general. In my mind, Haskell is the "best" language out there ("best" in that it provides the best overall gain when all tradeoffs are considered). I'm no longer confident that Haskell is the "best" language anymore. I was recently introduced to a language that might be even better than Haskell: Dyalog APL. ( link ). Try it out yourself ( link ) To explain why, I recommend watching Aaron Hsu's videos on Dyalog APL: - Does APL need a Type System? ( link ) - This is actually a very interesting question that is more nuanced than upon first glance. - Design Patterns and Anti-Patterns in APL ( link ) - The main takeaway from this video for me was the principle of "Idioms over libraries." - Higher Performance Tree-Wrangling, the APL way ( ▶ this video ) - Or how to model Trees without using pointers by using "Inverted Tables." (An inverted table is a table where the columns are the rows and the rows are the columns)

RecommendsView on HN
Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '1759:03

Breaking Down Programming Paradigms: APL's Surprising Learning Curve // Aaron Hsu // Dyalog '17

Dyalog User Meetings
7K views • 9 years ago
Depth-first search in APL11:32

Depth-first search in APL

Dyalog
11K views • 12 years ago
A Sudoku Solver in APL9:43

A Sudoku Solver in APL

Dyalog
47K views • 14 years ago
Conway's Game Of Life in APL7:48

Conway's Game Of Life in APL

Dyalog
236K views • 17 years ago
Co-dfns Live Stream: Compiler Design and Architecture2:03:12

Co-dfns Live Stream: Compiler Design and Architecture

Aaron Hsu (arcfide)
21K views • 9 years ago
Design Patterns vs  Anti pattern in APL by Aaron W Hsu at FnConf1754:10

Design Patterns vs Anti pattern in APL by Aaron W Hsu at FnConf17

ConfEngine
8K views • 8 years ago
Advanced Topics in Programming Languages: A Lock-Free Hash Table58:36

Advanced Topics in Programming Languages: A Lock-Free Hash Table

GoogleTalksArchive
29K views • 14 years ago
Does APL Need a Type System? by Aaron W Hsu at #FnConf1854:31

Does APL Need a Type System? by Aaron W Hsu at #FnConf18

ConfEngine
6K views • 7 years ago
Data-Oriented Demo: SOA, composition1:32:47

Data-Oriented Demo: SOA, composition

Jonathan Blow
201K views • 11 years ago
Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 20191:29:55

Sorting Algorithms: Speed Is Found In The Minds of People - Andrei Alexandrescu - CppCon 2019

CppCon
184K views • 7 years ago
Abseil's Open Source Hashtables: 2 Years In - Matt Kulukundis - CppCon 201954:01

Abseil's Open Source Hashtables: 2 Years In - Matt Kulukundis - CppCon 2019

CppCon
22K views • 7 years ago
"Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld38:38

"Tree-sitter - a new parsing system for programming tools" by Max Brunsfeld

Strange Loop Conference
63K views • 8 years ago
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
235K views • 12 years ago
Escape from the Heap: Low-Level Programming in Common Lisp56:49

Escape from the Heap: Low-Level Programming in Common Lisp

Arthur Gleckler
17K views • 10 years ago
C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance1:30:53

C++Now 2018: You Can Do Better than std::unordered_map: New Improvements to Hash Table Performance

CppNow
63K views • 8 years ago
RailsConf 2011: Aaron Patterson, "Double Dream Hands: So Intense!"47:34

RailsConf 2011: Aaron Patterson, "Double Dream Hands: So Intense!"

O'Reilly
26K views • 15 years ago
Simon Peyton Jones: Data Parallel Haskell1:19:57

Simon Peyton Jones: Data Parallel Haskell

nuACM
28K views • 16 years ago
Kilim: Fast, lightweight, cheap message passing in Java.45:11

Kilim: Fast, lightweight, cheap message passing in Java.

Google TechTalks
33K views • 18 years ago
'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]1:02:17

'Fastware' - Andrei Alexandrescu [ ACCU 2016 ]

ACCU Conference
34K views • 10 years ago
Stanford Seminar - Concatenative Programming: From Ivory to Metal1:04:45

Stanford Seminar - Concatenative Programming: From Ivory to Metal

Stanford Online
14K views • 8 years ago