Posts

Showing posts from July, 2020

When Python is Faster Than Julia

Image
Julia's JIT compiler produces code the runs much faster than Python but that compilation also takes time, which can result in Python programs being faster overall.There's a good quote on the Julia language web site: it says that Julia walks like Python but runs like C. Meaning that Julia is as easy to work with as Python - it has an easy syntax that can be learned quickly - but Julia programs run at a speed that rivals compiled languages like C. Python, on the other hand, is an interpreted language that is quite slow.
But for simple scripts like the one I use to generate up-to-date graphs for the Covid-19 pandemic, Python might be a better bet. Compilers v InterpretersCompilation means that the code that you write is converted into machine code, or something close to it, before the program is run. Machine code is the language that the processor in your computer executes directly, consequently compiled programs run fast. C is the archetypal compiled language and it is very fast. T…