technical computing in julia
TRANSCRIPT
Technical computing in
Jiahao Chen MIT CSAIL
Alan EdelmanJeff Bezanson Stefan Karpinski Viral B. Shah Andreas Noack Jake Bolewski
720 contributors + package writers
https://github.com/jiahao/ijulia-notebooks
The world of557 packages, 720 authors
345 contributors to julia repo5,239 stargazers436 watchers
What’s the big deal about Julia ?
A high level languagewith C-like speed
julialang.org/benchmarks
It bridges the divide between computer science and computational science
What’s the big deal about Julia ?
It bridges the divide between computer science and computational science
What’s the big deal about Julia ?
data abstraction
performance
It bridges the divide between computer science and computational science
What’s the big deal about Julia ?
data abstraction
performance
What if you didn’t have to choose between data abstraction and performance?
Object-oriented programming with classes
What can I do with/to a thing?
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top uppay fare
lose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top uppay fare
lose
buy
top uppay fare
lose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top uppay fare
lose
buy
top uppay fare
lose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top uppay fare
lose
buy
top uppay fare
lose
buy
pay farelose
buy
methods objects
Object-oriented programming with classes
What can I do with/to a thing?
top uppay fare
lose
buyclasses are more fundamental than methods
top uppay fare
lose
buy
pay farelose
buy
OOP with classes multi-methods
What can I do with/to a thing?
top up
pay fare
lose
buy
generic function
objectsmethods
multimethods
relationships between objects and functions
Multi-methods for linear algebra
What can I do with/to a thing?
compute spectral factorization
compute singular values
compute singular values and vectors
compute eigenvalues
generic function objectsmethods
Methods can take advantage of special matrix structures
eigvals
eigfact
svdvals
svdfact
Matrix
SymTridiagonal
Bidiagonal
easy to call external C functions, e.g. CLAPACK
sstev, dstev…
So how does this help us with linear algebra?
Multi-method dispatch with generic fallbacks
Matrix operations on general rings
So how does this help us with linear algebra?
Multi-method dispatch with generic fallbacks
Matrix operations on general rings textbook algorithm
So how does this help us with linear algebra?
Multi-method dispatch with generic fallbacks
Matrix operations on general rings
Native parallelism constructs
Native parallelism constructs
Native parallelism constructs
JuMP: a domain specific language
Iain Dunning Miles LubinMIT
Operations Research
http://github.com/JuliaLang/IJulia.jl
Summary
Types allow users to express scientific computations and the compiler to specialize code for performance
Other advanced features for performance: code generation, native parallel computing, …
MS246: High-level Technical Computing with Julia4:25 PM - 6:05 PM in Room 254 B
Pure-‐Julia FFT performance
2 4 8 16 32 64 128
256
512
1024
2048
4096
8192
16384
32768
65536
131072
262144
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
11000
12000
13000
14000
spee
d (m
flops
)
intel-mkl-dfti in-placeintel-mkl-dfti out-of-placefftw3 out-of-placefftw3 in-placefftw3-no-simd out-of-placefftw3-no-simd in-placedfftpackemayerjuliabloodworthcrosscwplibesrfft
double-precision complex, 1d transformspowers of two
already comparable to FFTPACK
[ actually was even a bit better; some recent inlining regressions in Julia snapshots ]
Steven Johnson, 2014-06 Presented at NAIS Codegen workshop