SREE RAGHAVAN A
NO: 438
WHAT IS DATA SCIENCE ?
Data science is the study of data . It involves developing methods of
recording, storing, and analyzing data to effectively extract useful
information.
CONTENTS
INTRODUCTION
ABOUT JULIA
IMPORTANCE OF JULIA
FEATURES
JULIA WITH OTHER LANGUAGES
SAMPLE CODE
ADAVANTAGES
DISADVANTAGES
CONCLUSION
INTRODUCTION
As high performance computing bends to the need of big data
application,speed remains essential.
The programs are getting more and more complex and time-
consuming to develop. a few years ago, when an hpc startup
edelman was involved in interactive supercomputing .it was
acquired by microsoft and its group set out to develop a
programming language, julia.
ABOUT JULIA
Designed by
Jeff Bezanson, Alan Edelman,
Stefan Karpinski, Viral B Shah
First appeared on 2012.
Stable version on 30 th december 2019.
WHY JULIA ?
Julia is a high-level, high-performance dynamic
programming language for technical computing,
with syntax that is familiar to users of other
technical computing environments.
It provides a sophisticated compiler, distributed
parallel execution, numerical accuracy
The creators wanted a language that satisfies:
1. The speed of C.
2. With the dynamism of Ruby.
3. Mathematical notations like Matlab.
4. As usable for general programming as Python.
5. As easy for statistics as R.
FEATURES
Multiple dispatch
Good performance
Built-in package manager
Call c functions directly
Parallel computing
MULTIPLE DISPATCH
All arguments are equally responsible to determine a
method.
In single dispatch the calls [Link]("fast") and
[Link](5) would dispatch to the same method and it
is up to the method to do different things with the
different types of the second parameter.
In Julia run(cat, "fast") and run(cat, 5) dispatch to
separate methods.
High-Performance JIT Compiler
Julia’s LLVM-based just-in-time (JIT) compiler combined with
the language’s design allow it to approach and often match the
performance of C.
Julia’s ability to compile code that reads like Python into
machine code that performs like C almost entirely derives from
Julia’s ability to specialize function definitions in this way.
JULIA AND OTHER LANGUAGES
Built-in package manager
Foreign function interfaces to a number of
languages like C and Fortran, C++
(unfortunately planned only for Julia 0.5),
Python, R, Matlab. This makes it relatively
easy to use code in any of these languages
Call c functions directly
To allow easy use of this existing code, Julia makes
it simple and efficient to call C and Fortran
functions.
The machine instructions generated by Julia’s JIT
are the same as a native C call would be, so the
resulting overhead is the same as calling a library
function from C code.
Sample Program On Julia
// C
#define M 500 # julia
void mmult(double A[M][M],double function mmult(A,B)
B[M][M],doubleC[M][M]) (M,N) = size(A);
{ //double C[M][M]; C = zeros(M,M);
int i,j,k; for i=1:M
for(i=0; i<M;i++) for j=1:M
for(j=0; j<M;j++) for k=1:M
{ C[i,j] += A[i,k]*B[k,j];
for(k=0; k<M;k++) end
C[i][j] += A[i][k]*B[k][j]; end
} end
} C;
end
Advantages
Julia already possesses a mature package ecosystem and can be
used as a feature-complete replacement for R or Python.
Julia’s compiler is so good that it will make any piece of code fast
– even bad code.
It's touted as a high-level language, which means it's easier to
learn. It's normally faster to write code in a high-level language.
Disadvantages
Julia arrays are 1-indexed, which can really trip you up
sometimes when you're used to Python, C/++, Java, etc
Julia list comprehensions (currently) lack the ability to
use conditionals, unlike Python. One can do this with for
loops and if/else, though, as normally done.
Julia dictionaries are hashed differently than Python
dictionaries, which can make them slower in many cases.
Conclusion
Julia is a flexible dynamic language, appropriate for
scientific and numerical computing
Julia combines the features of many other
programming languages like C, Matlab and Java etc.
Existence of JIT Compiler in Julia increases the
performance of computuing.
ANY
QUERIES
?