I am using Arduino IDE 1.8.15 on a Raspberry Pi 400.
I completed the official Arduino Starter Kit using the Uno that was included, then i jumped on the Nano RP2040 when it was released. I am currently doing once again all the Starter Kit projects, to get along with Nano RP2040, in order to be confortable with it.
Compilation time with the Uno is like a couple of seconds on my Pi 400, but with Nano RP2040, it is more than 40 seconds the first time, i just made the test with the Basic Blink sketch right now. Subsequent compilation are faster than this, but still very long i think.
Is this difference normal?
If yes, what explain this difference?
Is it something that could be improved with future core releases?
I know Pi 400 is not a power horse, but just asking for curiosity, because with Uno it's like instantaneous.
The core library of the Arduino Mbed OS boards platforms use Mbed OS, which is a massive program. That's all there under the hood to be compiled whether you have a simple Blink sketch or some incredibly complex IoT application.
There has been some very significant improvements since the Arduino Mbed OS platform first came out with the release of the Arduino Nano 33 BLE boards. The developers are likely the ones most affected by this compilation time, so I'm sure they are always thinking about ways to make it faster. But we are probably at the point where the low hanging fruit has been picked.
One thing you should check is that you are using the "Arduino Mbed OS Nano Boards" platform rather than the deprecated "Arduino Mbed OS Boards" platform. This will be shown in the Arduino IDE's Tools > Board menu as well as in Tools > Board > Boards Manager.
The "Arduino Mbed OS Boards" platform has support for all the Mbed OS compatible Arduino boards (Nano 33 BLE, Nano RP2040 Connect, Edge Connect, Portenta H7, Pico). This support for a wide range of microcontrollers caused the "Arduino Mbed OS Boards" platform to get very big. In order to improve things, the solution was found of splitting it into a variant for each family of Arduino board.