FSharp-08-Array.Parallel
单线程计算
1 | [|0..100|] |
index | value |
---|---|
0 | 0 |
1 | 1 |
2 | 4 |
3 | 9 |
4 | 16 |
5 | 25 |
6 | 36 |
7 | 49 |
8 | 64 |
9 | 81 |
10 | 100 |
11 | 121 |
12 | 144 |
13 | 169 |
14 | 196 |
15 | 225 |
16 | 256 |
17 | 289 |
18 | 324 |
19 | 361 |
(81 more) |
并行计算
1 | [|0..100|] |
index | value |
---|---|
0 | 0 |
1 | 1 |
2 | 4 |
3 | 9 |
4 | 16 |
5 | 25 |
6 | 36 |
7 | 49 |
8 | 64 |
9 | 81 |
10 | 100 |
11 | 121 |
12 | 144 |
13 | 169 |
14 | 196 |
15 | 225 |
16 | 256 |
17 | 289 |
18 | 324 |
19 | 361 |
(81 more) |
1 | [|0..100|] |
index | Item1 | Item2 |
---|---|---|
0 | 0 |
0 |
1 | 1 |
1 |
2 | 2 |
4 |
3 | 3 |
9 |
4 | 4 |
16 |
5 | 5 |
25 |
6 | 6 |
36 |
7 | 7 |
49 |
8 | 8 |
64 |
9 | 9 |
81 |
10 | 10 |
100 |
11 | 11 |
121 |
12 | 12 |
144 |
13 | 13 |
169 |
14 | 14 |
196 |
15 | 15 |
225 |
16 | 16 |
256 |
17 | 17 |
289 |
18 | 18 |
324 |
19 | 19 |
361 |
(81 more) |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment