Search found 774 matches

by einstein1969
03 May 2018 10:08
Forum: DOS Batch Forum
Topic: And now dos batch color secrets?
Replies: 19
Views: 8073

Re: And now dos batch color secrets?

Hi Icarus,

This is great result!!!

Einstein1969
by einstein1969
09 Dec 2017 18:00
Forum: DOS Batch Forum
Topic: timed batch file execution
Replies: 11
Views: 4072

Re: timed batch file execution

You could do something like this: :start if current_time more than 09:00 then notepad.exe wait 1 minute (or wait 24 hours) goto start Saso this? @echo off :label ping 127.0.0.1 -n 2 >nul if %time:~0,2% equ 9 if %time:~3,2% equ 0 ( start notepad.exe ping 127.0.0.1 -n 86398 >nul ) goto label einstein...
by einstein1969
21 Oct 2017 04:21
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have done the above optimizzation The new gain is about 15% or more for big NumQuads. time is in seconds http://i66.tinypic.com/2czcx14.png the new version include, if defined pidebug variable, print on title with current time and percent achieved. It sync the timer at 00 second before start for e...
by einstein1969
21 Oct 2017 01:35
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I thinks that next step is using multi-thread creating a pipeline... But in the middle there is an optimization in the block of division: AR_Recip/N AR_Recip/N => AR_Recip/(N*N) But this can have an overflow if N*N > 214747 For formulas : Pi = 48*arctan(1/18) + 32*arctan(1/57) - 20*arctan(1/239) and...
by einstein1969
19 Oct 2017 09:27
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have probed to tuning for best performance the version 4. There are few things to do but I have tried and I have done the follow: - The SET/A is faster if use costant then I have removed the variable @ - Remove unused variables, move at bottom of environment less used variables. N_FORMULA->_FORMUL...
by einstein1969
18 Oct 2017 11:57
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have compared the last version of mine and your and the original :shock: :shock: :shock: :lol:

time in seconds.
Image

Francesco
by einstein1969
18 Oct 2017 09:44
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

Hi Antonio, this version is very efficiency. There is a problem when I press CONTROL-C, the batch don't stop. It's possible break ? Francesco EDIT set /A A_NumGroups = 3 set /A A_NumQuads = NumGroups*25, A_MaxQuadIndex = A_NumQuads-1, @ = 10000 There is an error on A_NumQuads. It uses NumGroup inst...
by einstein1969
15 Oct 2017 07:52
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have just realized that SET/P is slower than FOR/F this version substitute the precedent. The break even point (BEP) is passed from about 500 NumQuads to about 400 NumQuads. http://i63.tinypic.com/qswo6a.png the new code: @if defined talk (echo on) else (echo off) setlocal EnableDelayedExpansion e...
by einstein1969
11 Oct 2017 08:28
Forum: DOS Batch Forum
Topic: How to move cursor upwards without cls?
Replies: 21
Views: 6428

Re: How to move cursor upwards without cls?

The timeout command go at 0,1 (x,y) and not 0,0 and delete the INITIAL next line partially(Line 4). IT leave a message that I delete with the CMD part with set /P. example: @echo off echo. Line 0 Echo. Line 1 echo. Line 2 Echo. Line 3 call :goto_home echo.Home pause>nul exit /B :goto_home timeout /t...
by einstein1969
11 Oct 2017 06:38
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have made some tests. The original pi are better for low NUMQUAD, but the pi on file is faster on big NUMQUAD. These are results. (Time in seconds) QUADS http://i63.tinypic.com/28mjnsm.png The pi on file include major change token from AAcini version This is the version on file. EDIT: I have resol...
by einstein1969
10 Oct 2017 09:02
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

very clever solution for minimize number of SET istruction. The limit on 8192 is in also the variable PRINTBUFFER. It is possible eliminate this problem on variable PRINTBUFFER? I'm working on a version that eliminate the use of variable. It use some files but is very slow at moment but the time is...
by einstein1969
07 Oct 2017 08:45
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

Thanks for the link. What is the best method for optimize this? I have profiled for 30 Numquads and the results are this: C:\Users\ACER\Desktop>pi.bat 30 pi.bat - By Don Cross - http://cosinekitty.com NumQuads=30 16:38:44,18 - started pi = 3.1415926535897932384626433832795028841971693993751058209749...
by einstein1969
07 Oct 2017 07:35
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I have done some test. I have changed the original pi with input the NUMQUADS parameter. Then I have tested at 15,30,45,60,75 NUMQUADS. The time is show in this table: Quads | Time --------------- 15 3 sec. ||| 30 8 sec. |||||||| 45 18 sec. |||||||||||||||||| 60 34 sec. |||||||||||||||||||||||||||||...
by einstein1969
05 Oct 2017 06:28
Forum: DOS Batch Forum
Topic: Math Challenge game in Batch
Replies: 1
Views: 1089

Re: Math Challenge game in Batch

multi thread in dos batch ...
I like it!

+1 Antonio ;)
by einstein1969
01 Oct 2017 08:59
Forum: DOS Batch Forum
Topic: Batch macro vs function call test
Replies: 18
Views: 7224

Re: Batch macro vs function call test

I post the original code too (not modified): @if defined talk (echo on) else (echo off) setlocal EnableDelayedExpansion echo.pi.bat - By Don Cross - http://cosinekitty.com set /a NumQuads = 30 set /a MaxQuadIndex = NumQuads - 1 echo. echo.%time% - started echo. call :PiEngine 48 18 32 57 -20 239 cal...