Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ForceOps.Benchmarks/src/FileAndDirectoryDeleterBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using ForceOps.Lib;

namespace ForceOps.Benchmarks;

// [SimpleJob(RuntimeMoniker.NativeAot80)]
[SimpleJob]
[SimpleJob(RuntimeMoniker.Net10_0, baseline: true)]
[SimpleJob(RuntimeMoniker.NativeAot10_0)]
public class FileAndDirectoryDeleterBenchmark
{
readonly List<byte[]> fileDatas = new();
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ RelaunchHelpers.RunWithRelaunchAsElevated(() =>
}, () => args.ToList(), forceOpsContext);
```

## Performance

Native AOT vs framework-dependent, measured with [hyperfine](https://github.com/sharkdp/hyperfine):

| Scenario | Native AOT | Framework-dependent | Speedup |
| --- | --- | --- | --- |
| `forceops --help` (startup) | 9.8 ms ± 1.1 ms | 107.9 ms ± 6.9 ms | 11x |
| `forceops rm` (directory with 1,000 files) | 151.4 ms ± 11.1 ms | 219.1 ms ± 15.8 ms | 1.45x |

The scoop and GitHub release installs are Native AOT. `dotnet tool install` is framework-dependent.

## Context

See [Benchmarks](https://domsleee.github.io/ForceOps/) on github pages.
Expand Down
Loading