Skip to content

Commit

Permalink
Adding Seq.traverse & sequence functions (#277)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
1eyewonder authored Sep 23, 2024
1 parent fd9460f commit a48180d
Show file tree
Hide file tree
Showing 24 changed files with 1,985 additions and 137 deletions.
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "benchmarks",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/benchmarks/bin/Release/net7.0/benchmarks.exe",
"args": [],
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"console": "integratedTerminal",
"preLaunchTask": "build release",
"cwd": "${workspaceFolder}/benchmarks/bin/Release/net7.0/"
}
]
}
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"editor.inlayHints.enabled": "off",
"FSharp.enableAdaptiveLspServer": true,
"FSharp.enableMSBuildProjectGraph": true,
"editor.formatOnSave": true,
"FSharp.notifications.trace": false,
"FSharp.notifications.traceNamespaces": [
"BoundModel.TypeCheck",
"BackgroundCompiler."
],
"FSharp.fsac.conserveMemory": true,
"FSharp.fsac.parallelReferenceResolution": false
}
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build release",
"type": "process",
"command": "dotnet",
"args": [
"build",
"-c",
"Release",
"${workspaceFolder}/FsToolkit.ErrorHandling.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
]
}
]
}
13 changes: 8 additions & 5 deletions benchmarks/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ open BenchmarkDotNet.Running
open benchmarks
open BenchmarkDotNet.Configs
open BenchmarkDotNet.Jobs
open BenchmarkDotNet.Columns
open BenchmarkDotNet.Environments
open BenchmarkDotNet.Reports
open FsToolkit.ErrorHandling.Benchmarks
open ApplicativeTests

[<EntryPoint>]
let main argv =

let cfg =
DefaultConfig
.Instance
DefaultConfig.Instance
// .AddJob(Job.Default.WithRuntime(CoreRuntime.Core50))
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core60))
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core70))
.AddColumn(StatisticColumn.P80, StatisticColumn.P95)
.WithSummaryStyle(SummaryStyle.Default.WithRatioStyle(RatioStyle.Trend))
// BenchmarkRunner.Run<EitherMapBenchmarks>() |> ignore
// BenchmarkRunner.Run<TaskResult_BindCEBenchmarks>(cfg) |> ignore
// BenchmarkRunner.Run<BindSameBenchmarks>() |> ignore

BenchmarkRunner.Run<Result_BindvsAndCEBenchmarks>(cfg)
BenchmarkRunner.Run<SeqTests.SeqBenchmarks>(cfg, argv)
|> ignore
//

0 // return an integer exit code
Loading

0 comments on commit a48180d

Please sign in to comment.