Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Play Basic - VM2 String Engine in PB1.62

Author
Message
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 3rd Jan 2007 05:04 Edited at: 28th Mar 2011 05:02
VM2 - String Engine Activated

I've just finished the main conversion from PlayBssic's string engine, with some spectacular results. (if i don't say so myself). Here's the current benchmark results between PB1.61 + PlayBASIC 1.62 running the code bellow.

The test is running on AMD 3000 system. The results are the average time over 200 frames. Each test is 25000 loops, working on75 to 100 Chr strings in most operations. You do the math, that's a tanker load of data !


PB1.61

Quote: "
Assignment = 4.04
Left & Right$ = 69.98
Instring = 182.612
Replace = 6723.07
Total Time = 1403.31 seconds
"


Yes, It took 23 and 1/2 minutes to run this test in PB1.61.. (1403/60 )



PB1.62

Quote: "
Assignment = 7.14
Left & Right$ = 17.27
Instring = 34.33
Replace = 75.20
Total Time = 27.37 seconds
"


The new engine is a bit slower during direct assignments though. I can probably enhance that, but I think it may well be due to the multi string format design. (IE's that's bit of overhead in a copy now) In other words, we'll loose a little in one area, but gain a lot in others. So it's not an issue worth worrying too much about !





Older Thread on the subject

Jeku
Moderator
20
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 4th Jan 2007 08:17
Wow, that is awesome! PB is really shaping up to be serious contender, if it's not already

Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 6th Jan 2007 01:42 Edited at: 25th Mar 2011 06:56
That horse bolted long ago !

Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 7th Jan 2007 13:38 Edited at: 25th Mar 2011 06:57
SplitToArray

SplitToArray() is one those very useful commands people seem to forget. While useful, I was never that happy with it's implementation behind the scenes. So today I've been totally rewriting to avoid memory thrashing with the new string engine, the results bellow speak for themselves. And there's room for improvement.

Just in case you're unsure SplitToArray() allows the programmer to convert a delimited string into Integer, float or String array in one hit.


Results for SplitToArray test (25000 calls, each call Splits string of 20 delimited string integers to an Integer array)

PB1.61 = 7150 (ish) milliseconds
PB1.62b = 153 milliseconds



Login to post a reply

Server time is: 2024-04-19 13:37:20
Your offset time is: 2024-04-19 13:37:20