PowerShell/Scripts/measure-sorting-algorithms.ps1

24 lines
641 B
PowerShell
Raw Normal View History

<#
.SYNOPSIS
Measure sorting algorithms
.DESCRIPTION
This PowerShell script measures the speed of several sorting algorithms and prints it.
.PARAMETER numIntegers
Specifies the number of integers to sort (3000 by default)
.EXAMPLE
PS> ./measure-sorting-algorithms.ps1
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
param([int]$numIntegers = 3000)
" "
& "$PSScriptRoot/measure-BubbleSort.ps1" $numIntegers
& "$PSScriptRoot/measure-BucketSort.ps1" $numIntegers
& "$PSScriptRoot/measure-HeapSort.ps1" $numIntegers
& "$PSScriptRoot/measure-QuickSort.ps1" $numIntegers
exit 0 # success