rqy2002 / RLJ

_Rqy's Local Judge for OIers and ACMers.
MIT License
42 stars 5 forks source link

Is it able to specify the optimization level? #1

Closed Enter-tainer closed 6 years ago

Enter-tainer commented 6 years ago

It's known that sometimes -O2 really makes your code runs faster. Whlie I'm solving some poisonous problems, I find that my code would get TLE without O2 optimization. So is it able to specify the optimization level in config.json?

{
  "Source"       : "example.cpp",
  "Input"        : "example#.in",
  "Output"       : "example#.ans",
  "#"            : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  "Time Limit"   : 1000,
  "Memory Limit" : 128,
  "Optimization Level" : "O2"
}

Chinese Translation 众所周知,氧气优化可以使你的程序跑的更快。在某些毒瘤题中,不开O2优化只会得到TLE,所以能否在config.json指定优化级别呢? 例如:

{
  "Source"       : "example.cpp",
  "Input"        : "example#.in",
  "Output"       : "example#.ans",
  "#"            : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  "Time Limit"   : 1000,
  "Memory Limit" : 128,
  "Optimization Level" : "O2"
}

或者在程序启动的参数中指定,例如:

$ rlj [-s|--slient] [-j Source | --judge Source] [-c ConfigFile] [-O2]
rqy2002 commented 6 years ago

Yes, I have considered this, and I add Compile parameter in config.json(but I have forgot it).

Since -O2 is used so often, I will consider add it to the argument.