This project is read-only.
1
Vote

New efficient container for phrases

description

For now, Localizator keeps all phrases in a List<Phrase> container. The Phrase class implements IComparable<T> and the comparison is based on key values. Just after loading, the phrases are being sorted and thus the binary search is used in:
 
loc["Some phrase"];
(or loc.GetPhrase("Some phrase"); )
 
but here must be replaced by linear search:
loc[6]
// loc.GetPhrase(6);
 
So getting phrases by Id is much less effective.
 
A new efficient container which will provide binary search for both variants - that's what's needed.

comments