Skip to content

Commit

Permalink
benchmark: compare foreach enmerations
Browse files Browse the repository at this point in the history
  • Loading branch information
ninmonkey committed Dec 22, 2023
1 parent eb5f584 commit b0566cc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Pwsh/Benchmark/Linq.EnumerableRange.benchmark.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@'
Outputs:
# grouped
# sort: Time
Technique Time RelativeSpeed GroupName Throughput
--------- ---- ------------- --------- ----------
Nums = [EnumerableRange]::(0, 4mb ) 00:00:00.0124675 1.00 160.42
[EnumerableRange]::(0, 4mb ) | %{ $_ } 00:00:00.0846974 6.79 23.61
Nums = 0..4mb 00:00:00.9147725 73.37 2.19
Nums = 0..4mb | %{ $_ } 00:00:32.7884668 2629.92 0.06
'@
h1 (Join-String -f 'File: {0}' -in $PSCommandPath)
Expand Down

0 comments on commit b0566cc

Please sign in to comment.