So I suppose it's better to use subroutines than pipes (pretty simple test):
Code: Select all
@echo off
set a=1
echo %time%
(
for /l %%# in (1,1,1000) do (
set a=2
(break|echo %%a%%)>nul
)
)
echo %time%
(
for /l %%# in (1,1,1000) do (
set a=3
(call ::subr %%a%%)>nul
)
)
echo %time%
exit /b %errorlevel%
:subr
echo %1
results on my machine:
Code: Select all
17:36:43.63
17:36:50.35
17:36:51.32