GitXplorerGitXplorer
m

Things-I-like-about-Julia

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
98f3192fedb8a36b7c98a0e2969497fcc1d6bb72

diffeq

mmsaroufim committed 6 years ago
Unverified
86757b23f1fcec02383a6f89c20f1d05ccd0e572

flux

mmsaroufim committed 6 years ago
Unverified
6946a3a7c14d1dfb682e08b4732efaac93283353

updates

mmsaroufim committed 6 years ago
Unverified
0851f77850b7e8d4514464a4e1521d17b4265f50

first commit

mmsaroufim committed 6 years ago

README

The README file for this repository.

Things I like about julia

tutorial.jl

Performance tips

https://docs.julialang.org/en/v1.0.0/manual/performance-tips/

  1. Have no global variables
  2. Add types ot function definitions to have smaller structs
  3. Add types to containers
  4. Avoid passing variable number of arguments to a function
  5. Avoid changing the type of a vriable
  6. Seperate structure setup and computation. Compiler knows what the types for computations become and can become faster
  7. Pre allocation data structures in functions would speed things up (I'm not sure this is always true)
  8. use @. is faster than alternatives for vectorized operations
  9. Arrays should be read and written contiguously for significant speedups

Flux.ml

https://www.youtube.com/watch?v=R81pmvTP_Ik

  • Can use CUDA libraries, numerical code up till a keras like library
  • Flux ecosystem can allow exports of models to the browser so can play against alpha go in the browser
  • Performance of DL libraries is a compiler problem
  • Uses Zygote.jl for AD libary
  • It's possible to handtune pytorch and more to get speed up to Julia but the Flux compiler is smarter
  • Error messages from inside a TF graph will show the whole stack but with Zygote
  • Wow: Can inspect LLVM code to see what zygote actually does and it's obvious how fast the code can be

Differential equations

Can build a DSL where you setup optimization constraints and objectives https://github.com/JuliaOpt/JuMP.jl/blob/master/examples/cannery.jl Language really makes you appreciate LISP like expressiveness