Very slow execution time

I just build Julia 1.4.2. (I could not install prebuild). I managed to run Julia Kernel in jupyter. To test OrdinaryDIffEq tutorial, I run introductory page. I noticed that Julia takes like 2-4 seconds to print Hello. When I run simple math code, it takes long. Why? I assume that my system is too old. 3.4 GHz Cpu dual core intel SSSE2

Glad to see you’re trying Julia! While that certainly is an old CPU, and I’m not sure the impact of that, or how long other languages take to do similar tasks for you, it is important to consider compilation time when running Julia code. Functions will have to be compiled when you run them, and the first run is always slower than subsequent ones. If you run these same functions multiple times, is it still that slow on subsequent runs?

1 Like

Printing hello first time was like 3-4 seconds in Jupyter
After reading your reply, I run in terminal print different text. It was instantaneous. Ok. so I see your point. So everytime I run a code, the first time will seem like forever. The problem is that I do not see a progress bar or something that will tell me how far the compiler progress is when it runs first time.
How about windows 7 julia from download binary, does the same thing happens on first time run? including the packages?

This will more or less happen for all of your code, for now. The first time is slow so compilation can happen, which allows subsequent runs to be faster. The same will be true for whichever platform/binary you use. Unfortunately compilation does not have any kind of progress bar.

On most machines, println will not take quite that long to compile, so I would guess that it is partly due to your machine.

3-4 seconds for print is quite abnormal though. I’d think something is off here.