Skip to content
Snippets Groups Projects
  1. Mar 20, 2017
  2. Mar 17, 2017
    • Christopher Arndt's avatar
      utime module documentation fixes and cleanup: · 9b80a1e3
      Christopher Arndt authored
      
      * Fix mis-spelling of `ticks_add` in code examples.
      * Be consistent about parentheses after function names.
      * Be consistent about formatting of function, variable and constant names.
      * Be consistent about spaces and punctuation.
      * Fix some language errors (missing or wrong words, wrong word order).
      * Keep line length under 90 chars.
      
      Signed-off-by: default avatarChristopher Arndt <chris@chrisarndt.de>
      9b80a1e3
    • Damien George's avatar
      py: Provide mp_decode_uint_value to help optimise stack usage. · 5640e6da
      Damien George authored
      This has a noticeable improvement on x86-64 and Thumb2 archs, where stack
      usage is reduced by 2 machine words in the VM.
      5640e6da
    • Damien George's avatar
      py: Reduce size of mp_code_state_t structure. · 71a3d6ec
      Damien George authored
      Instead of caching data that is constant (code_info, const_table and
      n_state), store just a pointer to the underlying function object from which
      this data can be derived.
      
      This helps reduce stack usage for the case when the mp_code_state_t
      structure is stored on the stack, as well as heap usage when it's stored
      on the heap.
      
      The downside is that the VM becomes a little more complex because it now
      needs to derive the data from the underlying function object.  But this
      doesn't impact the performance by much (if at all) because most of the
      decoding of data is done outside the main opcode loop.  Measurements using
      pystone show that little to no performance is lost.
      
      This patch also fixes a nasty bug whereby the bytecode can be reclaimed by
      the GC during execution.  With this patch there is always a pointer to the
      function object held by the VM during execution, since it's stored in the
      mp_code_state_t structure.
      71a3d6ec
  3. Mar 16, 2017
  4. Mar 15, 2017
  5. Mar 14, 2017
Loading