Skip to content

Instantly share code, notes, and snippets.

@ivandeex
Last active August 29, 2015 14:25
Show Gist options
  • Save ivandeex/f2ca947a1791cbeaed54 to your computer and use it in GitHub Desktop.
Save ivandeex/f2ca947a1791cbeaed54 to your computer and use it in GitHub Desktop.
member_lookup_optimizations.py
# lookup optimizations (ugly but fast)
queue = collections.deque()
queue_append, queue_popleft = queue.append, queue.popleft
queue_appendleft, queue_pop = queue.appendleft, queue.pop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment