Programming Talk / Play Basic - VM2 String Engine in PB1.62 |
| Author | Message | ||
|
Kevin Picone
Valued Member ![]() Joined: Tue Aug 27th 2002 Location: Australia |
VM2 - String Engine Activated I've just finished the main conversion from PB's string engine, with some spectacular results. (if i don't say so myself). Here's the current benchmark results between PB1.61 + PB1.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 ! + Code Snippet Older Thread on the subject |
||
| Back to top |
|||
|
Jeku
Moderator ![]() Joined: Fri Jul 4th 2003 Location: Vancouver, Canada |
Wow, that is awesome! PB is really shaping up to be serious contender, if it's not already |
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Kevin Picone
Valued Member ![]() Joined: Tue Aug 27th 2002 Location: Australia |
That horse bolted long ago ! |
||
| Back to top |
|||
|
Kevin Picone
Valued Member ![]() Joined: Tue Aug 27th 2002 Location: Australia |
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 + Code Snippet |
||
| Back to top |
|||
Sorry, but it has been so long since anyone replied to this Thread that it has been automatically locked.
You may read it but not reply.
You may read it but not reply.
Forum Search
Enter a word or phrase to search our Forum for:
|
|





