2 ms·
I strongly recommend reading about the Julia type system, which has had a lot of thought put into it: https://docs.julialang.org/en/stable/manual/types/ https:
by dnautics 9y ago
I strongly recommend reading about the Julia type system, which has had a lot of thought put into it:
https://docs.julialang.org/en/stable/manual/types/ https://docs.julialang.org/en/stable/manual/types/
Although it's "untyped" (in the sense of the video), because it's strongly typed, there are plenty of nonbrittle optimizations that are performed by the compiler on account of the type system, and the result is something that's often within 1~1.5x speed of C.
At the same time, I had to write my own numerical system and because of Julia's type system i could immediately plug it into the standard library's matrix algebra and fast fourier transform algorithms and do comparative analyses out of the box. You can even do exotic things -- I was testing some reed-solomon encoding and created a galois field type, and the standard library matrix solve algorithm worked out of the box on my custom type.
- dnautics 9y agoAddendum: Also really good is this video about how one should treat vectors and matrices in a type system. Has good lessons for python, R, and Matlab. Seriously anyone who does anything with vectors should watch this. https://www.youtube.com/watch?v=C2RO34b_oPM https://www.youtube.com/watch?v=C2RO34b_oPM