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 f43f9c3

Browse files
修改格式
代码块的格式修改
1 parent 7cc0b6d commit f43f9c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
第一个矩阵:O和#
66
第二个矩阵:O和B
77
使用一下代码,第一个矩阵仅用时8.25s就完成了:
8-
`
8+
```java
99
Random r = new Random();
1010
for (int i = 0; i < 1000; i++) {
1111
for (int j = 0; j < 1000; j++) {
@@ -18,9 +18,9 @@ for (int i = 0; i < 1000; i++) {
1818

1919
System.out.println("");
2020
}
21-
`
21+
````
2222
而使用相同的代码时,第二个矩阵却执行了259.152s
23-
`
23+
````java
2424
Random r = new Random();
2525
for (int i = 0; i < 1000; i++) {
2626
for (int j = 0; j < 1000; j++) {
@@ -33,7 +33,7 @@ for (int i = 0; i < 1000; i++) {
3333

3434
System.out.println("");
3535
}
36-
`
36+
````
3737
为什么两者的执行时间会有如此巨大的差距?
3838
---
3939
评论中一些人建议仅执行`System.out.print("#");`以及`System.out.print("B");`,前者用时7.8871s,而后者仍然在打印(即花费时间过多--译者注)

0 commit comments

Comments
(0)

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