# Hesitation during the first computation

I have installed the latest version 11.3 in a dual boot laptop with Windows 7 and Ubuntu 16.04. The laptop has a quad core i7 CPU capable of reaching 3.9 GHz (with turbo boost).

In both operating systems I have noticed the following: when I open Mathematica the very first execution takes a while to complete. For example, even the trivial 2 + 2 needs about 2 seconds for giving the answer. Then, if I repeat the calculation, or try another one the speed is normal (2 + 2 instantly).

So, why there is such a hesitation during the very first calculation? has anyone else experienced a similar situation? If so, is, there a way to fix that?

• The "hesitation" is the MathKernel being started. There is no way to avoid that. – Henrik Schumacher Jun 23 '18 at 15:37
• @HenrikSchumacher But why in previous versions of Mathematica there was no such hesitation? – Vaggelis_Z Jun 23 '18 at 15:40
• It has always been there. But as more an more definitions are made in the System context with every new version (instead of being put into specialized packages), more and more definitions have to be loaded when the kernel starts. So it may be that the load time is longer in newer versions than in older ones. – Henrik Schumacher Jun 23 '18 at 15:53

This loading time has already been there for earlier versions. But as more and more definitions are added to the System context with every new version (instead of being put into specialized packages), more and more definitions have to be loaded when the kernel starts. So it may be that the loading time is longer in newer versions than in older ones.
• I just did the following experiment: I installed version 11.0.1 in the same laptop. In version 11.0.1 the output of the first calculation of 2 + 2 is derived instantly. However in version 11.3 we have to wait for about 2 seconds. I do not believe that version 11.3 has so much more definitions added to the System. I could be wrong though... – Vaggelis_Z Jun 23 '18 at 17:00
• I happen to have version 11.0.1 and version 11.3, both for macOS . I can confirm that the older version can do "the first addition" a bit faster. The older version has 5898 and the new version has 6268 symbols in the "System"` context. But that's a poor indicator as several of these symbols will also be backed by libraries that also have to be loaded - and others are not. – Henrik Schumacher Jun 23 '18 at 17:13