-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize simple range mappings:
[for n in start..finish -> f n]
, &c. (
- Loading branch information
1 parent
43b7140
commit 3d3fc39
Showing
20 changed files
with
5,197 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
let f0 f = [|for n in 1..10 do f (); yield n|] | ||
let f00 f g = [|for n in 1..10 do f (); g (); yield n|] | ||
let f000 f = [|for n in 1..10 do f (); yield n; yield n + 1|] | ||
let f0000 () = [|for n in 1..10 do yield n|] | ||
let f1 () = [|for n in 1..10 -> n|] | ||
let f2 () = [|for n in 10..1 -> n|] | ||
let f3 () = [|for n in 1..1..10 -> n|] | ||
let f4 () = [|for n in 1..2..10 -> n|] | ||
let f5 () = [|for n in 10..1..1 -> n|] | ||
let f6 () = [|for n in 1..-1..10 -> n|] | ||
let f7 () = [|for n in 10..-1..1 -> n|] | ||
let f8 () = [|for n in 10..-2..1 -> n|] | ||
let f9 start = [|for n in start..10 -> n|] | ||
let f10 finish = [|for n in 1..finish -> n|] | ||
let f11 start finish = [|for n in start..finish -> n|] | ||
let f12 start = [|for n in start..1..10 -> n|] | ||
let f13 step = [|for n in 1..step..10 -> n|] | ||
let f14 finish = [|for n in 1..1..finish -> n|] | ||
let f15 start step = [|for n in start..step..10 -> n|] | ||
let f16 start finish = [|for n in start..1..finish -> n|] | ||
let f17 step finish = [|for n in 1..step..finish -> n|] | ||
let f18 start step finish = [|for n in start..step..finish -> n|] | ||
let f19 f = [|for n in f ()..10 -> n|] | ||
let f20 f = [|for n in 1..f () -> n|] | ||
let f21 f g = [|for n in f ()..g() -> n|] | ||
let f22 f = [|for n in f ()..1..10 -> n|] | ||
let f23 f = [|for n in 1..f ()..10 -> n|] | ||
let f24 f = [|for n in 1..1..f () -> n|] | ||
let f25 f g h = [|for n in f ()..g ()..h () -> n|] | ||
let f26 start step finish = [|for n in start..step..finish -> n, float n|] | ||
let f27 start step finish = [|for n in start..step..finish -> struct (n, float n)|] | ||
let f28 start step finish = [|for n in start..step..finish -> let x = n + 1 in n * n|] |
Oops, something went wrong.