I started learning how to do some basic performance profiling for Blender. I mostly tested loading scenes from Spring.
The DNA_elem_array_size function turned out to be relatively slow.
In my test the function was executed almost 11 million times and was responsible for 6.8% of the execution time.
This change roughly halved this time. I did two runs with and without this change (didn't do more because it takes forever).