In Dart vm, there are two operation mode. One is production mode, another is check mode. In check mode, dartvm would perform type checking during runtime, this is intended for debugging, but this would have impact on performance.
In coding game, performance is more relevant than type checking in runtime.
Hello, I’ve taken a look at the execution script and we do indeed launch Dart in check mode.
However, if I have to choose between the two modes, I’d tend to leave check mode on. You say performance is more relevant. I see your point but it really depends on what you’re doing.
I’m not a Dart user so I don’t really know but surely it helps to debug your code to have this mode on?
Say your trying to solve a Medium puzzle, your code could run faster but doesn’t actually need to. However, debug info is crucial to getting to the bottom of certain problems.
It’s true that some games really benefit from having a lot of execution time, and thus the code must be as performant as possible, but changing the execution mode would affect the entire platform.
As a Dart user, what is your opinion on this?
PS: Sorry for the late reply
Originally, I thought that the performance impact of check mode is large (maybe 2x). But after writing a few simple test cases, I found that the measured slow down is under 10%. This looks acceptable.