Recently, I start to use dlang in competitive programming.↵
There are 3 dlang compiler, "DMD", "LDC", "GDC".↵
↵
In competitive programming, best choice is "LDC", but in many online judge, we can use only "DMD" or "GDC".↵
↵
I hope to many online judge install "LDC", so I write this blog.↵
↵
### Compiler compare↵
↵
- DMD : Official compiler. Can use latest language version. Moderate Fast.↵
- LDC : based on llvm. Moderate new. **Very Fast**.↵
- GDC : based on gcc. Not new, Moderate Fast.↵
↵
## How to install ldc↵
↵
1. Go to github's release page [https://github.com/ldc-developers/ldc/releases](https://github.com/ldc-developers/ldc/releases)↵
2. Download ldc(If you use 64bit-linux, `ldc2-1.2.0-linux-x86_64.tar.xz`, in now)↵
3. Extract↵
4. ADD `/your/download/path/ldc2-1.2.0-linux-x86_64/bin` to $PATH.↵
↵
## How to use ldc↵
↵
- Debug mode : `ldc2 -d-debug A.d`↵
↵
- Release mode(and optimize) : `ldc2 -O -release A.d`↵
There are 3 dlang compiler, "DMD", "LDC", "GDC".↵
↵
In competitive programming, best choice is "LDC", but in many online judge, we can use only "DMD" or "GDC".↵
↵
I hope to many online judge install "LDC", so I write this blog.↵
↵
### Compiler compare↵
↵
- DMD : Official compiler. Can use latest language version. Moderate Fast.↵
- LDC : based on llvm. Moderate new. **Very Fast**.↵
- GDC : based on gcc. Not new, Moderate Fast.↵
↵
## How to install ldc↵
↵
1. Go to github's release page [https://github.com/ldc-developers/ldc/releases](https://github.com/ldc-developers/ldc/releases)↵
2. Download ldc(If you use 64bit-linux, `ldc2-1.2.0-linux-x86_64.tar.xz`, in now)↵
3. Extract↵
4. ADD `/your/download/path/ldc2-1.2.0-linux-x86_64/bin` to $PATH.↵
↵
## How to use ldc↵
↵
- Debug mode : `ldc2 -d-debug A.d`↵
↵
- Release mode(and optimize) : `ldc2 -O -release A.d`↵