"Outperforming Imperative with Pure Functional Languages" by Richard Feldman
Strange Loop Conference6 HN recommenders · recommended in 6 months, 2021-2025
98K views · 5 years ago · talk · evergreen
Richard Feldman explains how pure functional languages can match or beat imperative ones on performance. Compilers can turn immutable code into in-place mutation, avoiding naive copying. The talk draws on his work on the Roc language.
Recommended as the clearest explanation of why immutable data need not be slow, and as the introduction to Roc.
46:09Why Isn't Functional Programming the Norm? – Richard Feldman
Metosin
1.6M views • 7 years ago
44:43Ron Pressler - Pull Push: Please stop polluting our imperative languages with pure concepts-Curry On
Curry On!
25K views • 11 years ago
40:00"Agility & Robustness: Clojure spec" by Stuart Halloway
Strange Loop Conference
25K views • 10 years ago
43:31Analyzing Programs with Z3
Compose Conference
24K views • 10 years ago
1:12:56Lecture 1A: Overview and Introduction to Lisp
MIT OpenCourseWare
420K views • 7 years ago
58:22Lecture 1B | MIT 6.001 Structure and Interpretation, 1986
MIT OpenCourseWare
116K views • 17 years ago
1:24:38Lecture 7A: Metacircular Evaluator, Part 1
MIT OpenCourseWare
32K views • 7 years ago
1:07:10Brian Beckman: Don't fear the Monad
jasonofthel33t
415K views • 13 years ago
45:03Keynote: The Last Hope for Scala's Infinity War - John A. De Goes
Scalapeño
36K views • 8 years ago
42:31"Datafun: a functional query language" by Michael Arntzenius
Strange Loop Conference
9K views • 9 years ago
33:13"Pixie - A Lightweight Lisp with 'Magical' Powers" by Timothy Baldridge
Strange Loop Conference
30K views • 11 years ago
1:14:52Effective Programs - 10 Years of Clojure - Rich Hickey
ClojureTV
176K views • 9 years ago
32:44Clojure in a nutshell by James Trunk
Func Prog Sweden
104K views • 5 years ago
40:55"Controlling Time and Space: understanding the many formulations of FRP" by Evan Czaplicki
Strange Loop Conference
69K views • 12 years ago
1:09:24Effective ML
Jane Street
30K views • 10 years ago
1:19:57Simon Peyton Jones: Data Parallel Haskell
nuACM
28K views • 16 years ago
1:33:022013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++
CppNow
34K views • 13 years ago
1:10:05Are We There Yet - Rich Hickey
Zhang Jian
24K views • 7 years ago
36:31Hey Underscore, You're Doing It Wrong!
InfoQ
141K views • 13 years ago
1:05:51The Functional Programmer's Toolkit - Scott Wlaschin
NDC Conferences
79K views • 7 years ago
8 comments from Hacker News
We already have many great GC'd functional languages at that performance level. I first learned about Roc from this talk: ▶ this video That's a niche that is not currently filled (well, maybe MLTon) and that has me very excited! I'm sure I'm not alone here.
1. Structural sharing - most data doesn't change so you create a copy that reuses much of the original structure 2. Garbage collection and lexical scopes - you clean up memory quickly and in batch 3. Compiler optimizations - you turn functional constructs into imperative ones that reuse and mutate memory at compile-time, where it is provably safe to do so Roc Lang might interest you: ▶ this video
If you are interested, «why yet another programming language?». The unique selling point of Roc is clever optimization to convert purely functional source code to deep-imperative fast machine code, while keeping all the correctness of functional algorithms. See this video of Richard Feldman for details — «Outperforming Imperative with Pure Functional Languages»: ▶ this video Among those clever optimizations: - static reference counting (no GC, like in Rust, but with no borrowing and borrow problems); - stack allocation of the data with no external links; - hidden («opportunistic») mutability even in the cases, where Haskell or Lisp will copy the value.
> Functional programming experts say that their code is efficient because the compiler translates it to an efficient representation on the CPU. They have TCO and other things. But they don't mutate data and hence every function call creates a new data in memory taking up space. How do they overcome that? By letting the compiler make assumptions. For example, consecutive map calls can be converted into a single one. If the data isn't shared with something else, the compiler can mutate it. MUCH easier to paralellize maps. As a starting point for those nitty grittys, this talk is probably as good as any ▶ this video
Maybe link ? It's not production ready, I just saw nice talk by Richard Feldman [1] about it and it's inspired by Elm. [1] ▶ this video
So many new programming languages coming up with clever features that makes me wish I could mix and match their core features while using libraries from more popular languages. Up and coming Languages I am excited about - 1. Roc - ▶ this video 2. Zig - link 3. Scopes - link 4. Gleam - link 5. Odin - link 6. Koka - link 7. Unison - link
This talk by Richard Feldman about Roc (a new language) goed into why immutable does not necessarily mean slow and given enough attention can mean higher performance in certain cases: ▶ this video
> How would one optimize for immutability in this case, other than turning it back into mutability behind the scenes? Roc-lang, which is a functional, systems language in development uses something called opportunistic in-place mutation to do just that. Here's a video where the creator talks about it: ▶ this video