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

tiny update code style & fix typo#287

Open
Jackyele wants to merge 2 commits intoThriftpy:developfrom
Jackyele:develop
Open

tiny update code style & fix typo#287
Jackyele wants to merge 2 commits intoThriftpy:developfrom
Jackyele:develop

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