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 WIP - Accelerating Strings

Author
Message
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 29th Aug 2006 18:37 Edited at: 3rd Sep 2010 18:34
VM2 Work In Progress - Accelerating Strings

Recently i've been working through expanding the string backend. This is the base layer of code that handles the string data type(s). While it includes some functions, it's mainly just the fundamentals. (typed creation / destroy / addition/ compares/ sizing & conversions).. It's funny how much functionality you just forget about, opps .. Anyway i'm fleshing & retesting things as I go. So assuming things work ok, they should also be fine when dropped back into the VM.. Some bits may well be a bit faster , but we'll see I guess ..

One of the major changes from VM1, is that VM2 has built in support for three basic string types. "default PB String", "Fixed Length PB Strings" and "Null terminated" (windows styled). Initially I'm focusing on getting the PB default working correctly. I have another type in mind that would great for doing lots of string comparisons, which normally requires a truck load of brute force. But we'll see how we go with that. Can always drop in it later!


Oh dear - Now It's Too Fast

Well, it's the end of the coding day and i just couldn't help testing the speed of some of the new string addition functions. While it's early days, It looking good in this area already ! (Test machine Duron 800mhz)

PlayBasic VM2 Averages 7 milliseconds
DBpro Averages 19 milliseconds
B+ Averages 30 milliseconds
PlayBasic VM1 Averages 40 milliseconds
DB Averages 61 milliseconds






Cont..

This morning sees the completion of VM2's new string layer. I've spent most of the past day bug fixing and fine tuning the performance of each operation the best I can. That fine tuning is already seeing another *2 improvement in string addition alone (over the previous test above), plus various improvements has been made for string comparisons. While strings comparisons in VM2 are faster than the competition, there's only marginal improvement (ie. 1 milliseconds over 100,000 tests). But the new design does allow for faster rejection, So in those cases it can be *2 faster.


Note: This is an old test, VM2 is MUCH faster today

Login to post a reply

Server time is: 2024-04-24 19:13:36
Your offset time is: 2024-04-24 19:13:36