What I'm getting from this either might be faster for various reasons.
I tried a quick test on my Windows 11 laptop, which has Intel Core Ultra 7 165U processor and 16GB RAM. I used a kitchen timer to measure how long compiling the Audio WavFilePlayer takes.
32 bit toolchain took 31 seconds
64 bit toolchain took 27 seconds.
I forgot one other thing, in that you are actually running the GCC compiler, not random code compiled by GCC.
Internally, GCC uses a 64-bit integer type (called
HOST_WIDE_INT) to hold constants and such, In modern GCC's, this must be explicitly a 64-bit type (i.e. '
long long int' on a 32-bit system). So all calculations of user stuff, addresses, offsets, and such is done with
HOST_WIDE_INT and
unsigned HOST_WIDE_INT. When GCC itself is built using a 64-bit system, all of these calculations are typically done with a single instruction. If GCC is built as a 32-bit program, then all of these 64-bit operations are done as multiple instructions.
- Multiple instructions are needed to do the calculations (2 for adds, 8 for multiply, function call for divide, 5-8 for comparisons)
- Each load now involves 2 loads to load each 32-bit part into registers and 2 stores
- Because more registers are used for the wider type, it means the compiler has to do more spilling of registers to the stack
So I can imagine that this makes 32-bit GCC compilers slower.
However, the issue is whether some users are still using older Windows on 32-bit only systems. These users would not be able to run the new version of TeensyDuino. Of course there is the other side of the issue where new versions of the OSes are removing the support for running 32-bit programs, and you have to convert to 64-bit.