C/ieve 1.00 Beta - free release
Posted: Thu Jul 01, 2010 12:48 pm
The C/ieve Lib is a combination of three libraries in one handy package. The project started after years of complaints mostly with srod about the difficulty in PureBasic (and other basic compilers) to create pointer related structures (like b-trees etc); and as well as the speed losses due to "easy" and "fool proof" string libraries of these languages.
There is no demerit in this of course; it is simply against the grain for somebody raised with C (not C++).
The price/purchase can be ignored in the manual; I only ask for merit where merit is due; and if you wish to make a donation, you are welcome.
C/ieve derives its name from C (as in C language) and trieves (an efficient string search mechanism)
Anyway - what are the 3 libraries?
1) String library (the usual: assign, mid, left, right, stringfield, string reverse, concat, etc)
This is to bypass the PB string library and hold string data in a seperate space and gain in speed on string operations. Any app which relies on many string operations will gain quite a boost in speed especially with unicode.
2) Hash (or Map) Lib + Index (like creating an in memory database)
PB's maps are great and fast. But there is very little control on them. Cieves hash lib uses B-trees to store data which can allow even small maps to store efficiently huge amount of data (if memory is an issue). Stats provide user with the amount of collisions which can help you change the hash algorithim better suited for the data set you have.
But thats not all, hash library has an index feature - up to 7 indexes can be added to the hash table, and data can then be retrieved via that index - not only through the hash. The indexes use AVL trees which allow for reverse traversal, and remain fast even with loads of data.
3) trieve library
Trieves allow for "near" text searches. Best is to load the example and load the supplied dict.txt to see exactly how it works if you don't happen to know trieves - though as an example its what many browsers do when they do text phrase completion. C/ieve trieves store data very efficiently.
Library support unicode and ascii, and more importantly allows both to be used at the same time
In general the string library works faster than PB in normal in Ascii some functions as much as 4 times more, and much faster in Unicode; But when using the string functions together that real speed boosts can be obtained (usually at the cost of more RAM)
What I have found is the lib works better and faster on newer processors (eg on a quad CPU AMD 2800 the speed advantage is more than an Dual AMD 2000)
http://www.en3.biz/files/cieve_v100beta.zip
There are plenty of examples and a decent manual
cheers and enjoy
Terence
There is no demerit in this of course; it is simply against the grain for somebody raised with C (not C++).
The price/purchase can be ignored in the manual; I only ask for merit where merit is due; and if you wish to make a donation, you are welcome.
C/ieve derives its name from C (as in C language) and trieves (an efficient string search mechanism)
Anyway - what are the 3 libraries?
1) String library (the usual: assign, mid, left, right, stringfield, string reverse, concat, etc)
This is to bypass the PB string library and hold string data in a seperate space and gain in speed on string operations. Any app which relies on many string operations will gain quite a boost in speed especially with unicode.
2) Hash (or Map) Lib + Index (like creating an in memory database)
PB's maps are great and fast. But there is very little control on them. Cieves hash lib uses B-trees to store data which can allow even small maps to store efficiently huge amount of data (if memory is an issue). Stats provide user with the amount of collisions which can help you change the hash algorithim better suited for the data set you have.
But thats not all, hash library has an index feature - up to 7 indexes can be added to the hash table, and data can then be retrieved via that index - not only through the hash. The indexes use AVL trees which allow for reverse traversal, and remain fast even with loads of data.
3) trieve library
Trieves allow for "near" text searches. Best is to load the example and load the supplied dict.txt to see exactly how it works if you don't happen to know trieves - though as an example its what many browsers do when they do text phrase completion. C/ieve trieves store data very efficiently.
Library support unicode and ascii, and more importantly allows both to be used at the same time
In general the string library works faster than PB in normal in Ascii some functions as much as 4 times more, and much faster in Unicode; But when using the string functions together that real speed boosts can be obtained (usually at the cost of more RAM)
What I have found is the lib works better and faster on newer processors (eg on a quad CPU AMD 2800 the speed advantage is more than an Dual AMD 2000)
http://www.en3.biz/files/cieve_v100beta.zip
There are plenty of examples and a decent manual
cheers and enjoy
Terence