VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



String array pointers fast caching technique

by Rde (54 Submissions)
Category: String Manipulation
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

This is a simple string pointer caching technique that speeds up the testing of algorithms that manipulate string array pointers such are string sorting routines ...
I found the most time consuming part of sort testing was the resetting of the test array before every test ...
This is a solution that removes the need to re-assign strings into a test array before every test is started ...
This module contains two sub-routines named CacheArrayPtrs and ResetArrayPtrs ...
You call CacheArrayPtrs whenever the array is loaded with new items ...
You call ResetArrayPtrs before every test and instantly be ready to test the original cached array ... Update 16 Oct 09 to correct an error in the documentation only ...
Usage code included in 3kb zip.

API Declarations
CopyMemory API
ZeroMemory API
'
'Sub LoadArray()
'
' ' Code to load test
' ' strings into array
' '...
'
' ' Whenever the array is
' ' re-loaded cache the
' ' pointers in their
' ' original order
' CacheArrayPtrs sTestArray
'
'End Sub
'
'Sub SortTest()
'
' ' Reset the array items
' ' back to their original
' ' positions just before
' ' each new sorting test
' ResetArrayPtrs sTestArray
'
' ' Do the sorting
' strSort sTestArray
'
'End Sub
'

Rate String array pointers fast caching technique

Download String array pointers fast caching technique

Download String array pointers fast caching technique (2 KB)

String array pointers fast caching technique Comments

No comments have been posted about String array pointers fast caching technique. Why not be the first to post a comment about String array pointers fast caching technique.

Post your comment

Subject:
Message:
0/1000 characters