Question: why is the coordinate system compiler time specific? #398
-
What is the logic behind making the coordinate system compiler time specific? Whats the limitation to having the coordinate system be chosen at run time? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
looking at the source code So far I am seeing that it's |
Beta Was this translation helpful? Give feedback.
-
This was done for optimization. The code only knows about the chosen coordinates through comparisons to If it turns out that with present-day compilers we can get the same performance by specifying coordinates at runtime, then we could consider changing this. |
Beta Was this translation helpful? Give feedback.
This was done for optimization. The code only knows about the chosen coordinates through comparisons to
COORDINATE_SYSTEM
, especially inmeshblock.cpp
, and these could be set at runtime. But if the comparisons are not compile-time evaluatable, there is little chance the compiler will inline calls to functions in the Coordinates class.If it turns out that with present-day compilers we can get the same performance by specifying coordinates at runtime, then we could consider changing this.