Add some invariants to OrdList
authorIan Lynagh <igloo@earth.li>
Sat, 18 Aug 2007 13:21:02 +0000 (13:21 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 18 Aug 2007 13:21:02 +0000 (13:21 +0000)
commitdb01886e22bd80de8d94a8d5e71d2ca645cb7a8e
tree9c9e6468a270d4c122e0743c8f6e0a786634053e
parenta136382590fccdedd791e44599fb54b648407e2b
Add some invariants to OrdList
isNilOL is now constant time, rather than possibly having to walk a
tree of Two's. Compiling J.hs from trac #1136 now makes 10302 isNilOL
calls rather than 50050152. It's gone from 10.8% time to being unlisted
(i.e. <= 0.1%).
compiler/utils/OrdList.lhs