Making R run Fast - Jan Vitek
John O'Neill3 HN recommenders · recommended in 3 months, 2017–2023
talk · advanced · evergreen · 2017–2023 on HN
Jan Vitek of Northeastern University gives a meetup talk on the challenges of making the R language run fast. He explains what in R's semantics makes it hard to optimize and to build a JIT compiler for.
HN points to it as the best explanation of why R is so hard to optimize, often paired with talks on Python and used to explain what makes Julia fast.
Up next
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
15 HN recommender · 2017–2025
6 mo on HNThe Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski | JuliaCon 2019
The Julia Programming Language
9 HN recommender · 2019–2025
3 mo on HNShared memory parallelism in Julia | Kiran Pamnany | Cambridge Julia Meetup (May 2018)
The Julia Programming Language
4 HN recommender · 2018–2019
13 mo on HNRich Harris - Rethinking reactivity
You Gotta Love Frontend
15 HN recommender · 2019–2026
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
12 mo on HNWilliam Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]
PapersWeLove
11 HN recommender · 2017–2026
10 mo on HNCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
13 HN recommender · 2016–2024
8 mo on HNClasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming
Google TechTalks
8 HN recommender · 2015–2024
7 mo on HNCompiling C to printable x86, to make an executable research paper
suckerpinch
8 HN recommender · 2018–2023
7 mo on HNBreak Me00 The MoVfuscator Turning mov into a soul crushing RE nightmare Christopher Domas
Adrian Crenshaw
6 HN recommender · 2017–2026
7 mo on HNA Talk Near the Future of Python (a.k.a., Dave live-codes a WebAssembly Interpreter)
David Beazley
7 HN recommender · 2019–2025
7 mo on HNMiguel de Icaza: Swift Godot: Fixing the Multi-million dollar mistake #GodotCon2023
Godot Engine
6 HN recommender · 2023–2026
4 comments from Hacker News
I recommend watching this video - Making R run fast ▶ this video It's a little disappointing, because the conclusion is that R will probably never "run fast", but very interesting nonetheless.
Perhaps the best way to understand what makes Julia fast is to watch these two videos about Python and R and what makes them so hard to optimize: link ▶ this video Take everything mentioned in these videos that make Python and R really hard to optimize and don't do those things :D
Another talk on the difficulty of optimising R is this fantastic one by Jan Vitek: ▶ this video Also, my favourite R trick: foo <- function() {rm(foo, envir=environment(foo))}
This is disregarding the development of said ecosystems though. The point is that Python has been quite inhibitory to the development of this ecosystem. There are many corpses of automatic differentiation libraries (starting from autograd and tangent and then to things like theano to finally tensorflow and pytorch) and many corpses of JIT compilers and accelerators (Cython, Numba, pypy, and TensorFlow XLA, now PyTorch v2's JIT, etc.). What has been found over the last decade is that a large part of that is due to the design of the languages. Jan Vitek for example has a great talk which describes how difficult it is to write a JIT compiler for R due to certain design choices in the language ( link , or the more detailed version ▶ this video ). There are certain language constructs that void lots of optimizations which have to then be worked around, which is why Python JITs choose subsets of the language to avoid specific parts that are not easy to optimize or not possible to optimize. This is why each take a domain-specific subset, a different subset of the language for numba vs jax vs etc., to choose something that is nice for ML vs for more generic codes. With all of that, it's perfectly reasonable to point out that there have been languages which have been designed to not have the compilation difficulties, which have resulted having a single (JIT) compiler for the language. And by extension, it has made building machine learning and autodiff libraries not something that's a Go