[心得] C/C++/Delphi/FPC/Java stdin/stdout 速度
從 Codeforces problem 222B www.codeforces.com/problemset/status/222/problem/B
可觀察出,在 Windows x86 上:
C++
scanf 快,
cin 慢;
printf 快,
cout 慢。
FPC
read/writeln 都快過 GNU C 的 scanf/printf,
而 Delphi 又快過 FPC。
Java 6/7
BufferedReader(InputStream(System.in)) 快,
Scanner(System.in) 慢;
BufferedWriter(OutputStream(System.out)) 快,
PrintWriter(System.out) 中,
System.out.println() 慢。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.21.127.209
→
09/13 13:25, , 1F
09/13 13:25, 1F
感謝
推
09/16 01:01, , 2F
09/16 01:01, 2F
→
09/16 13:10, , 3F
09/16 13:10, 3F
※ 編輯: changyuheng 來自: 36.224.168.148 (09/24 23:57)
Programming 近期熱門文章
PTT數位生活區 即時熱門文章