I wrote a little .bat file, hoping to be able to create a matrix-like (0 and 1) output.
The problem is, that it is pretty slow, it takes nearly two seconds to fill one line.
Is there something I can do to get it run faster?
Matrix.bat:
@echo off
color 02
:start
if %random% LSS 16384 (
echo|set /p=1
) else (
echo|set /p=0
)
goto start
echo is very slow. So build your line without echoing the single chars, then echo the whole line at once. Another trick:
set /a "l=!random! &1"
uses the last Bit from!random!
only (so it gives either0
or1
). This is quicker than processing Integer.