Performance difference with PowerShell 7 and Windows PowerShell 5

I’ve been unable to find any official benchmarks for running a script using PowerShell 7 and Windows PowerShell 5 (which is bundled with Windows 10). As a comparison, in running some local tests, there appears to be a significant difference.

Are there any recommendations to measure the differences?

You won’t. The speed depends on the current circumstances you run your code in.

The general recommendation is - when speed matters measure it.

Regardless of that it depends pretty much on the task you want to achive. Sometimes it helps to run some tasks in parallel sometimes you can speed up things avoiding bottle necks on your particular infrastructure.

For example - usually we try to avoid the pipeline but you can even speed up the pipeline:

… or a little bit older … a nice talk from Chrissy about speeding up processing data: