Quick implementation of CompareText for D2009

I make extensive use of hash map data structures in my program. I use the Barry Kelly hash map implementation hosted on the Codegear forums. This implementation internally uses the RTL CompareText function. Profiling made me realize that SysUtils CompareText uses a lot of time.

I looked at

Fastcode Website

and found some faster implementations of CompareText. Unfortunately, they do not seem to work for D2009 and its Unicode strings.

Now to the question: is there a faster version that supports D2009 strings? The CompareText functions seem to have a lot of name when using hash maps (at least in the implementation I'm using right now), so minor performance improvements can really affect. Or should the implementations implemented there work for unicode strings?

+3
source share
1 answer

FastCode, , , , Delphi 2009, . , , , , . , Delphi, , , CompareText " " ASCII, Unicode. , , Unicode , ASCII.

, Unicode CompareText - ASCII, FastCode . , , , - . , , , FastCode Delphi RTL . , CompareText .

CompareText -, , - . CompareText , , , -. - , CompareText . , , .

, -, . , ( , - - ).

-, , TBucketList, . . . , , . , . ( 256-, , , .) TBucketList .

+4

Source: https://habr.com/ru/post/1704202/


All Articles