PyTd icon indicating copy to clipboard operation
PyTd copied to clipboard

Exit early for STRING datatypes

Open tetraptych opened this issue 8 years ago • 1 comments

Two small performance improvements:

  • In convertValue, if typeCode is STRING the long if...elif...else sequence is short-circuited.
  • Lists of types (NUMBER_TYPES, INT_TYPES, etc. are cast to sets for O(1) lookups.

tetraptych avatar Nov 13 '17 16:11 tetraptych

Good catch! Should be fixed now.

tetraptych avatar Nov 15 '17 20:11 tetraptych