Yeah I figured that was the case. Always impressed with your dedication to Purebasic FredFred wrote: Fri Jan 23, 2026 2:41 pm It's only the website which is wrong, the working link for alpha 1 is 'Download PureBasic 6.40 Beta 1 for Windows (x64)'. We usually don't do alpha so I won't change the website just for this time
@Skywalk: all should work (except the Purifier and some debugger stuff). The IDE is compiled with the 6.40 version, with threadsafe switch.
PureBasic 6.40 alpha 1 is ready, surprise inside !
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
-
threedslider
- Enthusiast

- Posts: 547
- Joined: Sat Feb 12, 2022 7:15 pm
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Thanks @Fred for clarity
And your source code :

And your source code :
Only take my speed is 6ms !! Very impressive !Fred wrote: Fri Jan 23, 2026 10:47 amCode: Select all
Start = ElapsedMilliseconds() a$ = "World WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld WorldWorld World" For l = 0 To 1000 b$ = b$ + a$ Next PrintN("Final length = " + Str(Len(b$))) PrintN("Large concat: "+Str(ElapsedMilliseconds() - Start) + " ms")
-
User_Russian
- Addict

- Posts: 1614
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
If you disable the debugger, the time will be 40 milliseconds.
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Dont stop he!!
10000 Thanks or more Fred and team really good news!
It looks like you also have an army of elves at work
Donwloading...
10000 Thanks or more Fred and team really good news!
It looks like you also have an army of elves at work
Donwloading...
If translation=Error: reply="Sorry, Im Spanish": Endif
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
At 1st congratulation to this desiccion!
I do a lot of crazy String manipulations what will probably fail with the new String System.
So I have some questions about it works under the hood:
1. Where the length information is saved?
2. How to read out directly?
3. And finally how to manipulate directly?
4. Do we have a length information of the allocated buffer too? (would be very helpful!)
I do a lot of crazy String manipulations what will probably fail with the new String System.
So I have some questions about it works under the hood:
1. Where the length information is saved?
2. How to read out directly?
3. And finally how to manipulate directly?
4. Do we have a length information of the allocated buffer too? (would be very helpful!)
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Amazing! If you did not manuiplate the ElapsedMilliseconds()!!!
I can't belive that the speed plus is only the change of String library.
I use prototyped String functions to prevent PB from creating string copies.
I'm working on a X-Reference Tool with a lot of Character and String functions.
(it's very early ProofOfConcept implementation because of that I can't say what is the correct result)
here the result for PB 6.30
Surprising: in 6.30 the Result form ASM to C-Backend differ in NoOfWords found
in PB6.40 the result differ in each attempt!
But Speed+ is amazing 90ms->57m +37%
Can't post the Code at the moment. It's a Project of some modules. I try to make Demo Project an upload it on GitHub
I can't belive that the speed plus is only the change of String library.
I use prototyped String functions to prevent PB from creating string copies.
I'm working on a X-Reference Tool with a lot of Character and String functions.
(it's very early ProofOfConcept implementation because of that I can't say what is the correct result)
here the result for PB 6.30
Result for PB6.40PB V6.30 : ASM-Backend
No of Codelines = 59368
Time to parse ms = 87
Total amount of Words = 91298
Different Words found = 14378
PB V6.30 : C-Backend
No of Codelines = 59368
Time to parse ms = 90
Total amount of Words = 91285
Different Words found = 14374
PB V6.40 : C-Backend
No of Codelines = 59368
Time to parse ms = 56
Total amount of Words = 83622
Different Words found = 14379
PB V6.40 : C-Backend
No of Codelines = 59368
Time to parse ms = 57
Total amount of Words = 83606
Different Words found = 14379
PB V6.40 : C-Backend
No of Codelines = 59368
Time to parse ms = 58
Total amount of Words = 83630
Different Words found = 14384
Surprising: in 6.30 the Result form ASM to C-Backend differ in NoOfWords found
in PB6.40 the result differ in each attempt!
But Speed+ is amazing 90ms->57m +37%
Can't post the Code at the moment. It's a Project of some modules. I try to make Demo Project an upload it on GitHub
Last edited by SMaag on Fri Jan 23, 2026 8:47 pm, edited 2 times in total.
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
It's a real surprise, it was expected.
Thanks a lot for your courage to take over the strings management after 30 years of loyal service.
With C Optimizer my times are PB 6.30 = 92 ms, PB 6.40 alpa 1 = 6 ms, waouh
I tested it with ExString to see if it was nearing the end of its life but not yet: 1 ms
Thanks a lot for your courage to take over the strings management after 30 years of loyal service.
With C Optimizer my times are PB 6.30 = 92 ms, PB 6.40 alpa 1 = 6 ms, waouh
I tested it with ExString to see if it was nearing the end of its life but not yet: 1 ms
Last edited by ChrisR on Fri Jan 23, 2026 8:46 pm, edited 1 time in total.
- marcoagpinto
- Addict

- Posts: 1087
- Joined: Sun Mar 10, 2013 3:01 pm
- Location: Portugal
- Contact:
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
@Fred,
Thank you!
<3 <3 <3 <3 <3 <3 <3 <3
Thank you!
<3 <3 <3 <3 <3 <3 <3 <3
-
threedslider
- Enthusiast

- Posts: 547
- Joined: Sat Feb 12, 2022 7:15 pm
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Thanks to @SMaag for testing in speed
Thanks to @ChrisR to you as well for testing
Thanks to @ChrisR to you as well for testing
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Hello Fred,
Is it also possible to correct the string length for API without memory leakage.
Is it also possible to correct the string length for API without memory leakage.
Code: Select all
;-TOP by mk-soft
Structure pb_string
len.i
c.c[0]
EndStructure
Procedure _FixStringLen(*string)
Protected i, *mem.pb_string
If *string
*mem = *string - SizeOf(pb_string)
Repeat
If *mem\c[i] = 0
*mem\len = i
Break
EndIf
i + 1
ForEver
EndIf
EndProcedure
Macro FixStringLen(String)
_FixStringLen(@String)
EndMacro
PureBasicPath$ = Space(#MAX_PATH)
GetModuleFileName_(GetModuleHandle_(#Null$), @PureBasicPath$, #MAX_PATH)
;PureBasicPath$ = PeekS(@PureBasicPath$)
FixStringLen(PureBasicPath$)
PureBasicPath$ = GetPathPart(PureBasicPath$)
Debug PureBasicPath$
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
That's great news you're tackling strings, is the new allocator being used system wide?
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Very interesting surprise, thanks. Looking forward to testing it when there's a Linux build. (No rush!
)
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
What do you mean by putting a zero? Strings can't contain Chr(0) so I don't understand. Or did you mean zero as in Chr(48)?Fred wrote:if you patch a string by putting a zero in it, the Len() function will be wrong, and the concat functions will fail. You will need to use PeekS() for this.
Not sure what this means, either. I do this in my app, so are you saying I can't do this anymore without PeekS() now?Fred wrote:Using Win32 API with Space() for example will require an extra PeekS().
Code: Select all
cap$=Space(999) : GetWindowText_(hWnd,cap$,999)Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
I think Fred's referring to the old way to split a string by replacing the token or delimiter with a \0.
The PeekS() may be more api compatible now than the Space() function which has a leading byte of len info?
The PeekS() may be more api compatible now than the Space() function which has a leading byte of len info?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: PureBasic 6.40 alpha 1 is ready, surprise inside !
Just like this:BarryG wrote: Sat Jan 24, 2026 3:19 amNot sure what this means, either. I do this in my app, so are you saying I can't do this anymore without PeekS() now?Fred wrote:Using Win32 API with Space() for example will require an extra PeekS().
Code: Select all
cap$=Space(999) : GetWindowText_(hWnd,cap$,999)
Code: Select all
cap$=Space(999) : GetWindowText_(hWnd,cap$,999) : cap$ = PeekS(cap$)quidquid Latine dictum sit altum videtur

