Skip to content
Snippets Groups Projects
  • Jean Chalard's avatar
    1ff8dc47
    Fill up a map of bigram addresses for lookup. · 1ff8dc47
    Jean Chalard authored
    We don't want to do a linear search on each terminal when there
    may be 100+ bigrams for a given word because that would be
    disastrous for performance. Also, we need to resolve each bigram
    address anyway.
    This change resolves the addresses at first and puts them in a
    balanced tree so that lookup will be O(log(n)).
    
    Bug: 6313806
    Change-Id: Ibf088035870b9acb41e948f0ab7af4726f2cee24
    1ff8dc47
    History
    Fill up a map of bigram addresses for lookup.
    Jean Chalard authored
    We don't want to do a linear search on each terminal when there
    may be 100+ bigrams for a given word because that would be
    disastrous for performance. Also, we need to resolve each bigram
    address anyway.
    This change resolves the addresses at first and puts them in a
    balanced tree so that lookup will be O(log(n)).
    
    Bug: 6313806
    Change-Id: Ibf088035870b9acb41e948f0ab7af4726f2cee24