News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Test piece for tree design

Started by hutch--, April 08, 2005, 03:00:48 AM

Previous topic - Next topic

hutch--

I have tidied up the two algos for building and testing the tree, put them into a library and written a test piece to see how fast the algos are. The biggest natural word collection I have is only about 15 thousand so I have instead included a utility from the sort stuff I did a while ago that will create lists of random character words to test the tree speed.

The results here seem OK for a prototype design, it will build a tree based on a million random words in about 3 seconds and the read back time is nearly identical. As the word list gets longer, it starts to get slower and this can be demonstrated by building smaller lists. 100000 words from the same utility build and read in about 160 milliseconds on this box but 10 times as many run at 3 seconds.

I have another mod to do on the design later to put a 256 item lookup table at the front to reduce the height of the tree and this should make the tree depth a lot lower and the average performance a lot faster but that is yet to be done.

Any comments are welcome.

PS : I posted the wrong version here, the correct version is posted below.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--

I have just discovered something interesting, by sorting the random words, either forward or reverse, the tree consruction and read back times drop to about one eighth of the random ordered words.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ghirai

Seems to work fine on my XP Pro SP2.

Quotex return value = 1
xx return value = 2
xxx return value = 3
xxxx return value = 4
xxxxx return value = 5
zero return value = 6
one return value = 7
two return value = 8
three return value = 9
four return value = 10
five return value = 11
six return value = 12
seven return value = 13
eight return value = 14
nine return value = 15
zzzzz return value = 16
zzzz return value = 17
zzz return value = 18
zz return value = 19
z return value = 20

Good job :U
MASM32 Project/RadASM mirror - http://ghirai.com/hutch/mmi.html

hutch--

It just dawned on me that I posted the wrong one, the above posted example is the same as the first one.

I have attached the correct one this time.

[attachment deleted by admin]
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php