After watching Errichto's this video on testing solutions I have created a powershell script for that. But when I run my script it runs more than 50 times slower than bash script what Errichto has shown in his video.
My question is, is there any way to improve the runtime of this powershell script? And It would be awesome if others share how they use script for debugging in contest time.
My powershell script:
for ($i = 0; ; $i++) {
Write-Output "$i"
Start-Process .\Generator.exe -RedirectStandardOutput .\in -NoNewWindow -Wait
Start-Process .\Brute.exe -RedirectStandardInput .\in -RedirectStandardOutput .\out1 -NoNewWindow -Wait
Start-Process .\Error.exe -RedirectStandardInput .\in -RedirectStandardOutput .\out2 -NoNewWindow -Wait
if ((Get-FileHash .\out1).Hash -ne (Get-FileHash .\out2).Hash) {
Compare-Object (Get-Content out1) (Get-Content out2)
break
}
}