Terasology / NameGenerator

This module adds name generators.
2 stars 9 forks source link

Markov probability chain should work on trees #3

Closed msteiger closed 10 years ago

msteiger commented 10 years ago

Right now, the Markov3 name generator uses O(n^4) units of memory with n being the number of alphabet characters.

This can be drastically reduced by using a tree-based implementation.

skaldarnar commented 10 years ago

This can be closed since we've discarded Markov3 in favor of a lookahead of 2(?)

msteiger commented 10 years ago

I agree. (26 chars)^3*4(int-size) / 1024 = 69 kB Using an array costs more memory, but is probably a lot faster and no implementation work is required.