Skip to content
Snippets Groups Projects
  1. May 09, 2016
    • Paul Sokolovsky's avatar
      py/vstr: Change allocation policy, +16 to requested size, instead of *2. · 6f34e138
      Paul Sokolovsky authored
      Effect measured on esp8266 port:
      
      Before:
      >>> pystone_lowmem.main(10000)
      Pystone(1.2) time for 10000 passes = 44214 ms
      This machine benchmarks at 226 pystones/second
      >>> pystone_lowmem.main(10000)
      Pystone(1.2) time for 10000 passes = 44246 ms
      This machine benchmarks at 226 pystones/second
      
      After:
      >>> pystone_lowmem.main(10000)
      Pystone(1.2) time for 10000 passes = 44343ms
      This machine benchmarks at 225 pystones/second
      >>> pystone_lowmem.main(10000)
      Pystone(1.2) time for 10000 passes = 44376ms
      This machine benchmarks at 225 pystones/second
      6f34e138
    • Paul Sokolovsky's avatar
      Revert "py/objstr: .format(): Avoid call to vstr_null_terminated_str()." · 40f0096e
      Paul Sokolovsky authored
      This reverts commit 6de8dbb4. The change
      was incorrect (correct change would require comparing with end pointer in
      each if statement in the block).
      40f0096e
    • Paul Sokolovsky's avatar
      py/vstr: vstr_null_terminated_str(): Extend string by at most one byte. · a1f2245a
      Paul Sokolovsky authored
      vstr_null_terminated_str is almost certainly a vstr finalization operation,
      so it should add the requested NUL byte, and not try to pre-allocate more.
      The previous implementation could actually allocate double of the buffer
      size.
      a1f2245a
    • Paul Sokolovsky's avatar
      py/objstr: .format(): Avoid call to vstr_null_terminated_str(). · 6de8dbb4
      Paul Sokolovsky authored
      By comparing with string end pointer instead of checking for NUL byte.
      Should alleviate reallocations and fragmentation a tiny bit.
      6de8dbb4
    • Damien George's avatar
      py/mpz: Fix mpn_div so that it doesn't modify memory of denominator. · 460b0863
      Damien George authored
      Previous to this patch bignum division and modulo would temporarily
      modify the RHS argument to the operation (eg x/y would modify y), but on
      return the RHS would be restored to its original value.  This is not
      allowed because arguments to binary operations are const, and in
      particular might live in ROM.  The modification was to normalise the arg
      (and then unnormalise before returning), and this patch makes it so the
      normalisation is done on the fly and the arg is now accessed as read-only.
      
      This change doesn't increase the order complexity of the operation, and
      actually reduces code size.
      460b0863
    • Paul Sokolovsky's avatar
      esp8266/main: Bump heap size to 28K. · de5e0ed2
      Paul Sokolovsky authored
      This is kind of compensation for 4K FatFs buffer size which is eaten away
      from it on FS mount. This should still leave enough of networking ("OS")
      heap.
      de5e0ed2
  2. May 08, 2016
  3. May 07, 2016
  4. May 06, 2016
  5. May 05, 2016
  6. May 04, 2016
  7. May 03, 2016
Loading