Skip to content

Commit a48180d

Browse files
authored
Adding Seq.traverse & sequence functions (#277)
* Added POC functions * benchmark updates * Refactored functions & added unit tests * Added documentation * Added more benchmarks * Updated unit tests to fix transpiling issues * Updated Seq.fooM functions to have an early exit condition * Updated benchmark functions to be more accurate of actual behavior * Inlined base traverse functions * Updated seq functions to seq expressions for improved performance per reviewer suggestions
1 parent fd9460f commit a48180d

24 files changed

+1985
-137
lines changed

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "benchmarks",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/benchmarks/bin/Release/net7.0/benchmarks.exe",
9+
"args": [],
10+
"env": {
11+
"ASPNETCORE_ENVIRONMENT": "Development"
12+
},
13+
"console": "integratedTerminal",
14+
"preLaunchTask": "build release",
15+
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net7.0/"
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
{
22
"editor.inlayHints.enabled": "off",
3-
"FSharp.enableAdaptiveLspServer": true,
43
"FSharp.enableMSBuildProjectGraph": true,
54
"editor.formatOnSave": true,
65
"FSharp.notifications.trace": false,
76
"FSharp.notifications.traceNamespaces": [
87
"BoundModel.TypeCheck",
98
"BackgroundCompiler."
109
],
11-
"FSharp.fsac.conserveMemory": true,
1210
"FSharp.fsac.parallelReferenceResolution": false
1311
}

.vscode/tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build release",
6+
"type": "process",
7+
"command": "dotnet",
8+
"args": [
9+
"build",
10+
"-c",
11+
"Release",
12+
"${workspaceFolder}/FsToolkit.ErrorHandling.sln",
13+
"/property:GenerateFullPaths=true",
14+
"/consoleloggerparameters:NoSummary"
15+
]
16+
}
17+
]
18+
}

benchmarks/Program.fs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@ open BenchmarkDotNet.Running
33
open benchmarks
44
open BenchmarkDotNet.Configs
55
open BenchmarkDotNet.Jobs
6+
open BenchmarkDotNet.Columns
67
open BenchmarkDotNet.Environments
8+
open BenchmarkDotNet.Reports
79
open FsToolkit.ErrorHandling.Benchmarks
810
open ApplicativeTests
911

1012
[<EntryPoint>]
1113
let main argv =
14+
1215
let cfg =
13-
DefaultConfig
14-
.Instance
16+
DefaultConfig.Instance
1517
// .AddJob(Job.Default.WithRuntime(CoreRuntime.Core50))
16-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core60))
18+
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core70))
19+
.AddColumn(StatisticColumn.P80, StatisticColumn.P95)
20+
.WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend))
1721
// BenchmarkRunner.Run<EitherMapBenchmarks>() |> ignore
1822
// BenchmarkRunner.Run<TaskResult_BindCEBenchmarks>(cfg) |> ignore
1923
// BenchmarkRunner.Run<BindSameBenchmarks>() |> ignore
2024

21-
BenchmarkRunner.Run<Result_BindvsAndCEBenchmarks>(cfg)
25+
BenchmarkRunner.Run<SeqTests.SeqBenchmarks>(cfg, argv)
2226
|> ignore
23-
//
2427

2528
0 // return an integer exit code

0 commit comments

Comments
 (0)