Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Потрошим змею: dis module

Потрошим змею: dis module

Почему некоторые операции быстрее других - ответы на очевидные вопросы с использованием timeit и dis.

Moscow Python Meetup

June 24, 2015
Tweet

More Decks by Moscow Python Meetup

Other Decks in Programming

Transcript

  1. life cycle • C++: drivers • Python: scripts for Internet

    service provider • Python: banks data • Python: sites, statistic
  2. dis – Python Bytecode Disassembler • Convert code objects to

    a human-readable representation of the bytecodes for analysis.
  3. fast faster fastest list(), dict(), tuple() [], {}, () for

    i in xrange(100): l.append(i) la =l.append for i in xrange(100): la(i) [x for x in xrange(10)] “{}”.format(90) str(90) “%s” % 90 results