mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 00:54:04 +01:00
24 lines
641 B
PowerShell
24 lines
641 B
PowerShell
|
<#
|
|||
|
.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
|