solnic/virtus — pull request #220 by Antti (2013-10-24 09:54:43+00:00)
Title: Performance fix for AttributeSet#each.

Using uniq on attributes array is slow, because it must compare
attributes to each other. This change makes initialization of a new
object with Virtus attributes at least 3 times faster (depends on a number of attributes)

Here's benchmark:
```
Rehearsal --------------------------------------------
old each 0.970000 0.000000 0.970000 ( 0.974661)
new each 0.360000 0.000000 0.360000 ( 0.362813)
----------------------------------- total: 1.330000sec

user system total real
old each 0.980000 0.000000 0.980000 ( 0.978254)
new each 0.380000 0.000000 0.380000 ( 0.372626)

```

```ruby
require 'virtus'
require 'date'
require 'benchmark'

class Virtus::AttributeSet