unneon/icie

Is testing with Alt+0 defaulted by DEBUG mode?

gratus907 opened this issue · 2 comments

I installed this plugin for the first time today, and I tried running some codes I wrote for previous problems. It seems the solution gets much much slower and results in TLE even though the solution passed nicely in real contest. It seems like using alt+0 runs solution in debug mode. If this is not the case, is there any reason the test seems slow? Or are there any options I can fix this?

Thanks in advance.

Yes, all tests are run in debug mode. This is because various flags can catch stuff like out of bounds in std::vector, integer overflows and the like, as well as run debuggers. Release mode is only used in stress tests for the brute force solution and the test generator. You can compile the source manually in release mode (Alt;) each time, or adjust the test time limit though (Ctrl,, Extensions > ICIE > Test > Time Limit). There is currently no option to configure this, but it can be easily added by changing this parameter to load something from config.

Though, the default time limit is 1.5 seconds. Do your tests actually run longer than that, or could the extension or solution be hanging somewhere? During contests, I usually use much smaller tests so I can debug them properly, but changing the default per-task seems like a useful feature if that's the case.

Thanks. It now seems natural to run tests in Debug mode now. I didn't know about useful flags.

Now after reading your comment, I realized that my code was quite unusual (running vast amount of precomputation, and printing out stuff) In release mode it took about 600ms just for precomputation. In this case there weren't some workaround like trying small data, since the size of data didn't help that much. Though these situations seems unlikely.

As long as stress tests are tested in release mode, such feature seems to be useful in limited situations....

Thanks for fast response :)