What are the compiler options that the judge uses?

Some languages are weirdly slow on some problems. Do they have optimization enabled/disabled while compiling? Does the online judge use any specific options while compiling my program? Is there a way for me to know what these options are for different languages?

3 Likes
  • C :
O2 - second optimization level,
lm - access to "math.h" library,
fomit-frame-pointer - disallow to store frame pointer in CPU register,
pthread - enable multithreading
  • C++ :
O2 - second optimization level,
lm - access to "math.h" library,
fomit-frame-pointer - disallow to store frame pointer in CPU register,
pthread - enable multithreading ````

- **Java**

NONE


- **Python :**

OO - don’t store debug information + don’t store docstrings


- **Python 3 :**

OO - don’t store debug information + don’t store docstrings


- **C++14 :**

O2 - second optimization level,
lm - access to “math.h” library,
fomit-frame-pointer - disallow to store frame pointer in CPU register,
pthread - enable multithreading


- **Pascal :**

O2 - second optimization level,
fomit-frame-pointer - disallow to store frame pointer in CPU register````

  • Ada :
O2 - second optimization level,
  • Scheme :
O0 - entry optimization level
  • Haskell :
O - first optimization level
  • Pascal :
O2 - second optimization level
  • Common Lisp :
dynamic-space-size 48 - amount of space (in MB) dedicated for startup
disable-debugger - disable debugger
  • C99 :
lm - access to "math.h" library,
fomit-frame-pointer - disallow to store frame pointer in CPU register,
pthread - enable multithreading
  • Javascript Rhino :
Xmx256M - memory limit equal to 256MB
Xms16M - start Java VM with 16MB of memory
  • Rust :
O - first optimization level
17 Likes

I wonder if you want to specify -Xss for Java as well

3 Likes

how to run .java file with this optimization?

Python
import psyco
psyco.full()

I have to submit my code written in the Swift language. But no compiler is showing for Swift language. Please let me know how can I submit Swift code?