Search found 973 matches
- 02 Aug 2025 11:06
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
I add this variant made by T3rror, because it introduces intelligent ideas without losing speed. Indeed it should be faster because it supposes the non -existence of double quotes around the variables Hi Einst - I was looking over the final StrLen macro version you posted on dostips and noticed an e...
- 24 Jul 2025 07:46
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
Thanks for the detailed and understandable explanation of escaping double quotes.
The rewritten code with spaces is a really good idea; I'll keep it in mind.
Francesco
The rewritten code with spaces is a really good idea; I'll keep it in mind.
Francesco
- 23 Jul 2025 01:23
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
Yes, what Antonio mentioned was used in that thread testing the performance of the set command, and in some cases there was a difference. In the meantime, I added the limit to 8191. It lost a bit in the lower range, but I don't understand why; further testing is needed. There was also a bug with the...
- 20 Jul 2025 06:29
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
The last one I made isn't the fastest, but a compressed version that uses the previous fast one. Here's the fast one (it took me a few days to create the macro on one line like you did; I'm going crazy.) :: make sure we are in the spotlight: :: run as administrator for realtime priority!!! :: /affin...
- 17 Jul 2025 02:07
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
even shorter. setlocal set "args=%1 %2" for /f "tokens=1-3" %%1 in ("!args! FEDCBA9876543210") do ( if defined %%~1 ( if "" neq "!%%~1:~255!" ( if "" neq "!%%~1:~4095!" ( set "$=!%%~1:~4095!" ) else set "$=!%%~1!" set "$scale=!$:~255,1!!$:~511,1!!$:~767,1!!$:~1023,1!!$:~1279,1!!$:~1535,1!!$:~1791,1!...
- 17 Jul 2025 01:34
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
I was referring to the slowing down of the "set": Why does SET performance degrade as environment size grows? This is a version that reduces the macro size while still maintaining almost all of its speed. It's a good fit for me. setlocal set "args=%1 %2" for /f "tokens=1,2" %%1 in ("!args!") do ( if...
- 16 Jul 2025 15:37
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
I tried to optimize the upper part even more, this is the code and the times setlocal set "args=str len" for /f "tokens=1,2" %%1 in ("!args!") do ( if defined %%~1 ( if "" neq "!%%~1:~255!" ( if "" neq "!%%~1:~4095!" ( set "$=!%%~1:~4095!" ) else set "$=!%%~1!" set "$scale=!$:~255,1!!$:~511,1!!$:~76...
- 16 Jul 2025 13:08
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
I made another version that's even faster, but I discarded it because the macro was too long and the env for Win 10 is a problem.
I haven't tried it on Windows 11, but they told me the set problem related to the env size is no longer there.
Do you know if this is the case?
I haven't tried it on Windows 11, but they told me the set problem related to the env size is no longer there.
Do you know if this is the case?
- 16 Jul 2025 13:02
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
I took the last one you made and optimized it a bit. I removed a "Set" from everything and removed another set for some lengths. Also in the upper part from 4096 to 8192. I compared it, and it's faster than the last one. Of course, I compared the code without the macros. I think you'll have to figur...
- 15 Jul 2025 11:45
- Forum: DOS Batch Forum
- Topic: strLen boosted
- Replies: 52
- Views: 141022
Re: strLen boosted
It's been a year since the version I had on my PC. Yours seems faster. I haven't had time to study it. I added it to the old tests and I think the added checks and setlocal slow it down a bit. Now I'm studying it to see if there's anything I can improve on in terms of speed. @echo off setlocal Enabl...
- 03 May 2025 08:40
- Forum: DOS Batch Forum
- Topic: 3D rotating donut
- Replies: 5
- Views: 11515
Re: 3D rotating donut
... "_SIN=a-a*a/1920*a/312500+a*a/1920*a/15625*a/15625*a/2560000-a*a/1875*a/15360*a/15625*a/15625*a/16000*a/44800000" this seemed to have an algorithm protection ex) 1+3 =4 or (1/2 + 3/40*20)*200/100=4 there is no protection, if you calculate the third term for x=7000, with your formula it gives 13...
- 28 Feb 2025 03:31
- Forum: DOS Batch Forum
- Topic: Dos Batch Math Library
- Replies: 73
- Views: 261713
Re: Dos Batch Math Library
@miskox I'm trying that formula 10000*y/10/2 and mathematically since there is a multiplication by 10000 (which has 2 and 5 among the prime factors) the division by these should give an exact integer result without remainder or fractional part. That is, for any Y in that formula there is no remainde...
- 25 Nov 2024 10:58
- Forum: DOS Batch Forum
- Topic: SET /A overflow
- Replies: 7
- Views: 18978
Re: SET /A overflow
... In addition worked around the bug: "if 2147483647 LSS -1 echo true" echoes "true" on windows xp home 32 bit (?!) but it's not a bug only for "-1" it does it for all the pairs that have the same representation and with the bit sign different. At least it seems to me. On win10 if 2123153877 lss -...
- 11 Oct 2024 05:11
- Forum: DOS Batch Forum
- Topic: help with multilinea macro in not delayed
- Replies: 4
- Views: 43474
Re: help with multilinea macro in not delayed
basically the question is this. Is it possible to bypass the endlocal barrier/tunnel inside a call of variables that have LF or in any case the code to create multiline macros? I enter the procedure with the value of the delayed variables or active or inactive, then I activate it if necessary, I do ...
- 22 Sep 2024 14:52
- Forum: DOS Batch Forum
- Topic: help with multilinea macro in not delayed
- Replies: 4
- Views: 43474
Re: help with multilinea macro in not delayed
I explained myself badly. I expanded the code hoping that you can understand where I'm having difficulty I have a code that reads a file and prepares the macro in this format: set macro=<code>[LF]<code>[LF]<etc> @echo off setlocal enabledelayedexpansion rem From Honguito98 idea call :AutomacroLite "...