Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57fddc5

Browse files
Update why-is-printing-b-dramatically-slower-than-printing.md
1 parent f43f9c3 commit 57fddc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contents/why-is-printing-b-dramatically-slower-than-printing.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ for (int i = 0; i < 1000; i++) {
3636
````
3737
为什么两者的执行时间会有如此巨大的差距?
3838
---
39-
评论中一些人建议仅执行`System.out.print("#");`以及`System.out.print("B");`,前者用时7.8871s,而后者仍然在打印(即花费时间过多--译者注)
39+
评论中一些人建议仅执行```System.out.print("#");`以及`System.out.print("B");```,前者用时7.8871s,而后者仍然在打印(即花费时间过多--译者注)
4040
另外有些人指出在他们那里工作正常(即两者花费时间差不错--译者注),我在[Ideone.com](http://ideone.com/)环境中运行两段代码,执行时间也差不多。
4141

4242
测试条件:
4343
1.Netbeans 7.2,结果输出在IDE的控制台
44-
2.使用`System.nanoTime()`度量时间
44+
2.使用```System.nanoTime()```度量时间
4545

4646

4747
###回答

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /