From: Martin DeMello Date: 2005-02-25T04:15:11+09:00 Subject: Re: Optimisation help needed Robert Klemme wrote: > > There we some errors still. I did a bit of fixing and tidying up. Most > interesting I find the simplification achieved by "EOW = > DawgNode.new.freeze". Subtle problem: current.children[char] = eoword ? DawgNode::EOW : nodes[ptr] doesn't work because a node could be both EOW *and* have children. But looks like a very nice clean approach on the whole - will happily replace my old code with this. martin