Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Conversation

@Jackyele
Copy link

  1. fix typo
  2. tiny code style update
  3. change the type of thrift_reserved_keywords to set for possible speed up
import timeit

def test_l(s=thrift_reserved_keywords):
    return 'aa' in s

def test_s(s=set(thrift_reserved_keywords)):
    return 'aa' in s

# test...
print timeit.repeat(test_l)  # 1.476s
print timeit.repeat(test_s)  # 0.143s

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant