constant time window lookups using contexts