# Julia vs Python
## Speeds
- ### CPU Time
- ![[1_OH_n58xfBC7HSP2U8ZC1GQ.png|600]]
- [Source](https://towardsdatascience.com/r-vs-python-vs-julia-90456a2bcbab)
- ### Growth
- ![[0_PjalpbFQdusoHyek.png|600]]
- [Source](https://theiotmagazine.com/julia-vs-python-will-it-unseat-the-king-of-programming-8220e4cd2e0a)
## # Julia Vs Python: Will it unseat the king of programming?
https://theiotmagazine.com/julia-vs-python-will-it-unseat-the-king-of-programming-8220e4cd2e0a
![[1_I28YfheXBOfv8lwqeJVaww.png]]
It seems that the larger ecosystem in Python is moot since Julia can call Python libraries natively
## Julia vs. Python: Which is best for data science?
- [https://www.infoworld.com/article/3241107/julia-vs-python-which-is-best-for-data-science.html](https://www.infoworld.com/article/3241107/julia-vs-python-which-is-best-for-data-science.html)
### Julia > Python
- **Julia is fast.** Julia’s JIT compilation and type declarations mean it can routinely beat “pure,” unoptimized Python by orders of magnitude. Python can be _made_ faster by way of external libraries, third-party JIT compilers (PyPy), and optimizations with tools like Cython, but Julia is designed to be faster right out of the gate.
- **Julia has a math-friendly syntax.** A major target audience for Julia is users of scientific computing languages and environments like Matlab, R, Mathematica, and Octave. Julia’s syntax for math operations looks more like the way math formulas are written outside of the computing world, making it easier for non-programmers to pick up on.
- **Julia has automatic memory management.** Like Python, Julia doesn’t burden the user with the details of allocating and freeing memory, and it provides some measure of manual control over garbage collection. The idea is that if you switch to Julia, you don’t lose one of Python’s common conveniences.
- **Julia offers superior parallelism.** Math and scientific computing thrive when you can make use of the full resources available on a given machine, especially multiple cores. Both Python and Julia can run operations in parallel. However, Python’s methods for parallelizing operations often require data to be serialized and deserialized between threads or nodes, while Julia’s parallelization is more refined. Further, Julia’s parallelization syntax is less top-heavy than Python’s, lowering the threshold to its use.
- **Julia is developing its own native machine learning libraries.** [Flux](https://fluxml.ai/) is a machine learning library for Julia that has [many existing model patterns](https://github.com/FluxML/model-zoo) for common use cases. Since it's written entirely in Julia, it can be modified as needed by the user, and it uses Julia's native just-in-time compilation to optimize projects from inside out.
### Python > Julia
- **Python uses zero-based array indexing.** In most languages, Python and C included, the first element of an array is accessed with a zero—e.g., string\[0\] in Python for the first character in a string. Julia uses 1 for the first element in an array. This isn’t an arbitrary decision; many other math and science applications, like Mathematica, use 1-indexing, and Julia is intended to appeal to that audience. It’s possible to support zero-indexing in Julia with an [experimental feature](https://docs.julialang.org/en/latest/devdocs/offset-arrays/), but 1-indexing by default may stand in the way of adoption by a more general-use audience with ingrained programming habits.
- **Python has far more third-party packages.** The breadth and usefulness of Python’s culture of third-party packages remains one of the language’s biggest attractions. Again, Julia’s relative newness means the culture of software around it is still small. Some of that is offset by the ability to use existing C and Python libraries, but Julia needs libraries of its own to thrive. Libraries like Flux and Knet make Julia useful for machine learning and deep learning, but the vast majority of that work is still done with TensorFlow or PyTorch.
- **Python has millions of users.** A language is nothing without a large, devoted, and active community around it. The community around Julia is enthusiastic and growing, but it is still only a fraction of the size of the Python community. Python’s [huge community](https://www.infoworld.com/article/3401536/python-popularity-reaches-an-all-time-high.html) is a huge advantage.
- **Python is getting faster.** Aside from gaining improvements to the Python interpreter (including improvements to multi-core and parallel processing), Python has become easier to speed up. The [mypyc](https://github.com/mypyc/mypyc) project translates type-annotated Python into native C, far less clunkily than Cython. It typically yields four-fold performance improvements, and often much more for pure mathematical operations.