lunarmodules / luassert

Assertion library for Lua
MIT License
202 stars 77 forks source link

Refactor spy addition and removal #101

Closed o-lim closed 9 years ago

o-lim commented 9 years ago

Refactor snapshot state to insert/remove spies to/from end of list instead of begining of list. This improves the efficiency of insertion and removal of a spy to be O(1) instead of O(n). Hence, reverting a snapshot now becomes O(n) instead of O(n^2).