Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Вячеслав Безбородов. Julia vs. Python

Вячеслав Безбородов. Julia vs. Python

Я расскажу об особенностях использования языка Julia и языка Python для решения вычислительных задач большой размерности, с примерами кода и комментариями.

Python Community Chelyabinsk

October 21, 2017

More Decks by Python Community Chelyabinsk

Other Decks in Research


  1. A language for technical computing Julia features • Multiple dispatch

    • Dynamic type system • Call Python functions • Call C functions directly (no wrappers or special APIs needed) • Designed for parallelism and distributed computation • Efficient support for Unicode, including but not limited to UTF-8 • Free and open source (MIT licensed) History remark Julia was first appeared in 2012. It’s a young language with quite small, but quickly growing community. WIKI It is a flexible dynamic language, appropriate for scientific and numerical computing, with performance comparable to traditional statically-typed languages.
  2. 1-based indexing In Julia, indexing of arrays, strings, etc. is

    1-based not 0-based. Julia does not support negative indexes. In particular, the last element of a list or array is indexed with end in Julia, not -1 as in Python. Indentation level is not significant as it is in Python. Julia's for, if, while, etc. blocks are terminated by the end keyword. Julia arrays are column major (Fortran ordered) whereas NumPy arrays are row major (C-ordered) by default To get optimal performance when looping over arrays, the order of the loops should be reversed in Julia relative to NumPy. Julia requires end to end a block. Unlike Python, Julia has no pass keyword. In Julia % is the remainder operator, whereas in Python it is the modulus. Noteworthy differences from Python