Possible compilation timeout for Rust (on LoCaM)


#1

Hello,

I am starting to hit a wall on the LoCaM contest because I have random timeout at game start with 2 possible errors messages:

bash: /tmp/Answer: No such file or directory (https://www.codingame.com/replay/332223241)
bash: /tmp/Answer: Permission denied (https://www.codingame.com/replay/332219648)

The occurrence of the timeout is directly correllated to the size of the source code and start to be visible after ~800 sloc.
It is also partially correlated to the complexity of the syntax used: long iterator chain with heavy type interference and borrowing are more likely to lead to timeout than just a simple for loop. But it's far from being an exact science.

The code does compile locally on my laptop with the same rustc version (1.27.2) . Compilation time has a noticeable variance: for my current version at 1000 sloc it takes from 4 to 4.5 sec to build in release mode with 70% of the time spent in link time optimization.

Is it possible to confirm these timeout are related to compilation time? And if it is, would it be possible to raise the compilation timeout for Rust (1 or 2 second)?

Thanks


Scala timeouts killing me. How to speed up compile time?
#2

Not sure if it can help, but similar issues have been found recently with C++ since the language update, if the program takes too long to compile it will time out. The problem was ultimately fixed by the user so I don't think anything is coming (soon?) to alleviate this on the back-end. You might need to toy around with your program to fix it. :confused:


#3

Thanks for the information reCurse

I'll try to tweak my code and if it yields no result I'll go back to a simpler algorithm