PureBasic 6.40 beta 2 is ready, surprise inside !

Developed or developing a new product in PureBasic? Tell the world about it.
PeDe
Enthusiast
Enthusiast
Posts: 358
Joined: Sun Nov 26, 2017 3:13 pm

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by PeDe »

Raspberry Pi 500, Raspberry Pi OS, arm64 (Debian 13)

With the RaspPi, it's a little different:

Code: Select all

                              v6.30    v6.40b2
Litteral assign:              35 ms    77 ms -
Big litteral assign:         327 ms   129 ms +
Ucase litteral assign:      3270 ms  3029 ms +
Ucase assign:                440 ms   377 ms +
Ucase complex assign:       1065 ms   908 ms +
Str assign:                   75 ms    82 ms -
Str concat:                  207 ms   411 ms -
Final length = 264292
Large concat:                144 ms    33 ms +
Comparison dynamic buffer:   108 ms   123 ms -
Procedure with strings call: 320 ms   388 ms -
Finished
Peter
User avatar
Jacobus
Enthusiast
Enthusiast
Posts: 168
Joined: Wed Nov 16, 2005 7:51 pm
Location: France
Contact:

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Jacobus »

I repeated the test on both 64-bit versions to highlight the results. Two values ​​are better with PB 6.30.
Result in one image:
Image
PureBasicien tu es, PureBasicien tu resteras.
Fred
Administrator
Administrator
Posts: 18558
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Fred »

PeDe wrote: Thu Mar 12, 2026 6:10 am Raspberry Pi 500, Raspberry Pi OS, arm64 (Debian 13)

With the RaspPi, it's a little different:

Code: Select all

                              v6.30    v6.40b2
Litteral assign:              35 ms    77 ms -
Big litteral assign:         327 ms   129 ms +
Ucase litteral assign:      3270 ms  3029 ms +
Ucase assign:                440 ms   377 ms +
Ucase complex assign:       1065 ms   908 ms +
Str assign:                   75 ms    82 ms -
Str concat:                  207 ms   411 ms -
Final length = 264292
Large concat:                144 ms    33 ms +
Comparison dynamic buffer:   108 ms   123 ms -
Procedure with strings call: 320 ms   388 ms -
Finished
Peter
Mimalloc is disabled on RaspPI for now, that's probably why it's similar for alloc stuff. I will try to activate it but I got some build issue with mimalloc itself so stay tuned.
Fred
Administrator
Administrator
Posts: 18558
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Fred »

skywalk wrote: Wed Mar 11, 2026 6:54 pm A picture with normalized values even better!

It is weird that some use cases are only 2x better?
Does that mean it was already optimized or there is still room for improvement in 6.40?
Well, 2x better is huge, no ? The old system wasn't that bad perfomance wise, but it has some limitation and some very hacky implementation which made the maintenance hard. Also when the Thread mode was enabled (which is for most apps nowaday) there was an extra performance hit. Now, the perfs are the same in thread and non-threaded mode.

The benchmark doesn't include string functions, but some are much faster, like Len(), Right(), RSet(), Mid(), etc. Basically having an instant length info is very useful for a lot of commands.
User avatar
skywalk
Addict
Addict
Posts: 4320
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by skywalk »

Ok, I will redo my split() and join() speed tests, but many years ago it was 600x faster with comparememorystring() vs native PB string calls.
Thanks for clarifying where the new 2x comes from.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 534
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Mindphazer »

On my Mac (M4 Pro, MacOS 26.3.1)

PB 6.30

Code: Select all

Litteral assign: 30 ms
Big litteral assign: 292 ms
Ucase litteral assign: 713 ms
Ucase assign: 112 ms
Ucase complex assign: 269 ms
Str assign: 34 ms
Str concat: 84 ms
Final length = 264292
Large concat: 114 ms
Comparison dynamic buffer: 19 ms
Procedure with strings call: 93 ms
PB 6.40b2

Code: Select all

Litteral assign: 31 ms
Big litteral assign: 43 ms
Ucase litteral assign: 497 ms
Ucase assign: 60 ms
Ucase complex assign: 158 ms
Str assign: 28 ms
Str concat: 191 ms
Final length = 264292
Large concat: 4 ms
Comparison dynamic buffer: 24 ms
Procedure with strings call: 108 ms
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 26.1 - Iphone 17 Pro Max - iPad at home
...and unfortunately... Windows at work...
Fred
Administrator
Administrator
Posts: 18558
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Fred »

Can you test with threadsafe mode activated to see if there is some diffs ?
threedslider
Enthusiast
Enthusiast
Posts: 621
Joined: Sat Feb 12, 2022 7:15 pm

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by threedslider »

Hi all,

Without debugger :)

6.30 :

Code: Select all

Litteral assign: 90 ms
Big litteral assign: 301 ms
Ucase litteral assign: 735 ms
Ucase assign: 117 ms
Ucase complex assign: 248 ms
Str assign: 65 ms
Str concat: 112 ms
Final length = 264292
Large concat: 81 ms
Comparison dynamic buffer: 33 ms
Procedure with strings call: 218 ms
Finished
6.40 b2 :

Code: Select all

Litteral assign: 26 ms
Big litteral assign: 36 ms
Ucase litteral assign: 356 ms
Ucase assign: 45 ms
Ucase complex assign: 102 ms
Str assign: 26 ms
Str concat: 146 ms
Final length = 264292
Large concat: 7 ms
Comparison dynamic buffer: 39 ms
Procedure with strings call: 117 ms
Finished
threedslider
Enthusiast
Enthusiast
Posts: 621
Joined: Sat Feb 12, 2022 7:15 pm

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by threedslider »

PB 6.21 is a bit faster than the PB 6.30 :shock:

Code: Select all

Litteral assign: 76 ms
Big litteral assign: 275 ms
Ucase litteral assign: 719 ms
Ucase assign: 110 ms
Ucase complex assign: 241 ms
Str assign: 64 ms
Str concat: 112 ms
Final length = 264292
Large concat: 81 ms
Comparison dynamic buffer: 33 ms
Procedure with strings call: 223 ms
Finished
User avatar
minimy
Addict
Addict
Posts: 902
Joined: Mon Jul 08, 2013 8:43 pm
Location: off world

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by minimy »

Just to know PB6.02 :lol:
I think it depends a lot on the CPU your PC has.

Code: Select all

Litteral assign: 100 ms
Big litteral assign: 493 ms
Ucase litteral assign: 1050 ms
Ucase assign: 178 ms
Ucase complex assign: 406 ms
Str assign: 94 ms
Str concat: 174 ms
Final length = 264292
Large concat: 236 ms
Comparison dynamic buffer: 38 ms 🔝
Procedure with strings call: 290 ms

Code: Select all

6.40b2
Litteral assign: 94 ms
Big litteral assign: 84 ms
Ucase litteral assign: 472 ms
Ucase assign: 54 ms
Ucase complex assign: 128 ms
Str assign: 66 ms
Str concat: 210 ms
Final length = 264292
Large concat: 9 ms
Comparison dynamic buffer: 50 ms
Procedure with strings call: 303 ms
Finished
If translation=Error: reply="Sorry, Im Spanish": Endif
User avatar
idle
Always Here
Always Here
Posts: 6243
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by idle »

looks good and works with PBScript VM too.
Litteral assign: 23 ms
Big litteral assign: 35 ms
Ucase litteral assign: 513 ms
Ucase assign: 59 ms
Ucase complex assign: 145 ms
Str assign: 30 ms
Str concat: 141 ms
Final length = 264292
Large concat: 10 ms
Comparison dynamic buffer: 30 ms
Procedure with strings call: 110 ms
Finished
Cezary
Enthusiast
Enthusiast
Posts: 122
Joined: Sun Feb 12, 2017 2:31 pm

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Cezary »

And Now for Something Completely Different...

I have a problem with ContainerGadget, similar to the one described here:

viewtopic.php?t=86735

Is there a chance to do something about this before the 6.40 release? Or maybe I'm doing something wrong?

Code: Select all

OpenWindow(0, 200, 200, 220, 150, "test",  #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
PanelGadget(1, 0, 0, 200, 120)
AddGadgetItem(1, -1, "Tab1")
ContainerGadget(3, 20, 20, 100, 50)
TextGadget(4, 20, 20, 50, 20, "text1")
CloseGadgetList()
TextGadget(5, 140, 40, 50, 20, "text2")
CloseGadgetList()
Repeat
Until #PB_Event_CloseWindow = WaitWindowEvent()
Desktop: Windows 11 x64
Fred
Administrator
Administrator
Posts: 18558
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Fred »

Why don't you create a proper bug report ?
breeze4me
Enthusiast
Enthusiast
Posts: 680
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by breeze4me »

Cezary wrote: Fri Mar 13, 2026 8:27 am And Now for Something Completely Different...

I have a problem with ContainerGadget, similar to the one described here:

viewtopic.php?t=86735

Is there a chance to do something about this before the 6.40 release? Or maybe I'm doing something wrong?

Code: Select all

OpenWindow(0, 200, 200, 220, 150, "test",  #PB_Window_MinimizeGadget | #PB_Window_TitleBar)
PanelGadget(1, 0, 0, 200, 120)
AddGadgetItem(1, -1, "Tab1")
ContainerGadget(3, 20, 20, 100, 50)
TextGadget(4, 20, 20, 50, 20, "text1")
CloseGadgetList()
TextGadget(5, 140, 40, 50, 20, "text2")
CloseGadgetList()
Repeat
Until #PB_Event_CloseWindow = WaitWindowEvent()
Desktop: Windows 11 x64
Unlike a frame gadget, a container gadget is not transparent, so it is normal.
Cezary
Enthusiast
Enthusiast
Posts: 122
Joined: Sun Feb 12, 2017 2:31 pm

Re: PureBasic 6.40 beta 2 is ready, surprise inside !

Post by Cezary »

Fred wrote: Fri Mar 13, 2026 9:35 am Why don't you create a proper bug report ?
I somehow thought this was related to the beta version fixes. I've corrected myself now, sorry.
Post Reply