quantopian/zipline — pull request #48 by ehebert (2012-12-21 19:25:11+00:00)
Title: Changes tests from using an ndict for trades to an Event object.

When run over large amounts of data the use of ndict's gets and sets
become a large bottleneck, around 1/5th of the CPU time is spent
in ndict's `__setattr__`, `__getattr__`, etc.

By switching to an object for an event,
we reduce the penalty significantly.

Removes asserts that check for event being an `ndict`, as well as those
that assume a certain behavior of the `__contains__` method for events.