twitter/twitter-cldr-rb — pull request #55 by KL-7 (2012-07-21 18:53:53+00:00)
Title: Loading collation tries from dumps.

Here's a benchmark of default trie and Korean tailored trie (the biggest of tailored tries) loading without this patch:

```ruby
>> require 'benchmark'
>> puts Benchmark.measure { TwitterCldr::Collation::Collator.default_fce_trie }
0.500000 0.000000 0.500000 (0.503665)
>> puts Benchmark.measure { TwitterCldr::Collation::Collator.tailored_fce_trie(:ko) }
0.360000 0.010000 0.370000 (0.374226)
```

And here's the result with this patch:

```ruby
>> require 'benchmark'
>> puts Benchmark.measure { TwitterCldr::Collation::Collator.default_trie }
0.120000 0.000000 0.120000 (0.124052)
>> puts Benchmark.measure { TwitterCldr::Collation::Collator.tailored_trie(:ko) }
0.050000 0.000000 0.050000 (0.051029)
```

In both benchmarks loading time for Korean tailored trie doesn't include time for loading default trie, because after first call to `Collator.default_fce_trie` default trie is cached.