aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-07tests/bench: Add testcase for positional/kwargs to enumerate().Paul Sokolovsky
Inspired by discussion in #577. So, in this case of builtin function, passing args by keyword has less than 1% overhead.
2014-05-07tests/bench: Add tests for various ways to pass function args.Paul Sokolovsky
Passing 3 args with keywords is for example 50% slower than via positional args.
2014-05-07tests/bench: Add variation on loop_count/while_down_ne test.Paul Sokolovsky
2014-05-07tests/bench: Add testcases for lookup in 5-el instance and namedtuple.Paul Sokolovsky
... and we have not that bad mapping type after all - lookup time is ~ the same as in one-attr instance. My namedtuple implementation on the other hand degrades awfully. So, need to rework it. First observation is that named tuple fields are accessed as attributes, so all names are interned at the program start. Then, really should store field array as qstr[], and do quick 32/64 bit scan thru it.
2014-05-07tests/bench: Time namedtuple field access.Paul Sokolovsky
That's higher than instance field access - behold the power of hashing.
2014-05-07py: Fix emitcpy, to work with latest changes to PASS variables.Damien George
2014-05-07tests: Add a test for native code on pyboard.Damien George
2014-05-07tests: Add inline assembler test for pyboard.Damien George
2014-05-07py: Improve native emitter; now supports more opcodes.Damien George
2014-05-07py, compiler: Improve passes; add an extra pass for native emitter.Damien George
2014-05-07py, compiler: Start adding support for compile-time constants.Damien George
Just a start, no working code yet. As per issue #573.
2014-05-07unix: Add missing stdio.h header for readline.Damien George
2014-05-07Merge pull request #582 from dhylands/unix-inputDamien George
Add input command for unix
2014-05-07Add input command for unixDave Hylands
2014-05-07Merge pull request #581 from stinos/windows-mathDamien George
windows: Enable math module
2014-05-07windows: Enable math modulestijn
2014-05-07stream: Make non-blcoking stream support configurable.Paul Sokolovsky
Enable only on unix. To avoid unpleasant surprises with error codes.
2014-05-07unix modsocket: Add comments re: recv() vs read(), etc. semantics.Paul Sokolovsky
2014-05-07stream: Use standard name of DEFAULT_BUFFER_SIZE.Paul Sokolovsky
2014-05-07stream: Add compliant handling of non-blocking readall().Paul Sokolovsky
2014-05-07stream: Add compliant handling of non-blocking read()/write().Paul Sokolovsky
In case of empty non-blocking read()/write(), both return None. read() cannot return 0, as that means EOF, so returns another value, and then write() just follows. This is still pretty unexpected, and typical "if not len:" check would treat this as EOF. Well, non-blocking files require special handling! This also kind of makes it depending on POSIX, but well, anything else should emulate POSIX anyway ;-).
2014-05-06py, parser: Add commented-out code to discard doc strings.Damien George
Doesn't help with RAM reduction because doc strings are interned as soon as they are encountered, which is too soon to do any optimisations on them.
2014-05-06Merge branch 'master' of https://github.com/micropython/micropythonDamien George
Conflicts: py/argcheck.c py/objenumerate.c py/runtime.h
2014-05-06py: Add keyword arg support to enumerate constructor.Damien George
Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
2014-05-06py: bytes(), str(): Add NotImplementedError for kwargs.Paul Sokolovsky
Addresses #567.
2014-05-06py: enumerate(): Add NotImplementedError for kwargs.Paul Sokolovsky
Addresses #577.
2014-05-06stmhal: pyb: Use gc() function as defined by standard module "gc".Paul Sokolovsky
TODO: Get rid of this compatibility define and rely on standard module.
2014-05-06modgc: Add new module for GC-related functionality.Paul Sokolovsky
2014-05-05py: Comment exc_state member from mp_obj_gen_instance_t as it gives troublestijn
...to some compilers who can't process 2 zero-sized arrays in structs. It's never referenced directly anyway. See disussion on #568 as well.
2014-05-05py-version.sh: Use --always option of git describe.Paul Sokolovsky
2014-05-05Merge pull request #571 from dhylands/fix-extint-docDamien George
Change references (in comments) of pyb.GPIO to be pyb.Pin
2014-05-05Change references (in comments) of pyb.GPIO to be pyb.PinDave Hylands
The documentation at http://micropython.org/doc/module/pyb/ExtInt should also be updated.
2014-05-05examples, SDdatalogger: Add more comments; reduce power consumption.Damien George
2014-05-05Merge pull request #566 from turbinenreiter/masterDamien George
added SDdatalogger example
2014-05-05py: Turn down amount of RAM parser and compiler use.Damien George
There are 2 locations in parser, and 1 in compiler, where memory allocation is not precise. In the parser it's the rule stack and result stack, in the compiler it's the array for the identifiers in the current scope. All other mallocs are exact (ie they don't allocate more than is needed). This patch adds tuning options (MP_ALLOC_*) to mpconfig.h for these 3 inexact allocations. The inexact allocations in the parser should actually be close to logarithmic: you need an exponentially larger script (absent pathological cases) to use up more room on the rule and result stacks. As such, the default allocation policy for these is now to start with a modest sized stack, but grow only in small increments. For the identifier arrays in the compiler, these now start out quite small (4 entries, since most functions don't have that many ids), and grow incrementally by 6 (since if you have more ids than 4, you probably have quite a few more, but it wouldn't be exponentially more). Partially addresses issue #560.
2014-05-05tests/bench/var: Add tests for class/instance var access.Paul Sokolovsky
Also compared with method abstraction for accessing instance vars - it's more than 3 times slower than accessing var directly.
2014-05-05tests: Add framework for comparative benchmarking.Paul Sokolovsky
Motivation is optimizing handling of various constructs as well as understanding which constructs are more efficient in MicroPython. More info: http://forum.micropython.org/viewtopic.php?f=3&t=77 Results are wildly unexpected. For example, "optimization" of range iteration into while loop makes it twice as slow. Generally, the more bytecodes, the slower the code.
2014-05-05py-version.sh: Make it work in case no git tag is present.Paul Sokolovsky
2014-05-05py, unix: Add -v option, print bytecode dump if used.Paul Sokolovsky
This will work if MICROPY_DEBUG_PRINTERS is defined, which is only for unix/windows ports. This makes it convenient to user uPy normally, but easily get bytecode dump on the spot if needed, without constant recompiles back and forth. TODO: Add more useful debug output, adjust verbosity level on which specifically bytecode dump happens.
2014-05-04showbc: Quote block name, so it was easily visible.Paul Sokolovsky
2014-05-04deleted garbageSebastian Plamauer
2014-05-04created SDdatalogger exampleSebastian Plamauer
2014-05-04stmhal: Document physical pins for SPI, I2C, UART busses.Damien George
2014-05-04tests, pyb: Add 'import pyb' when needed.Damien George
2014-05-04unix: Remove test class and code.Damien George
2014-05-04Merge pull request #563 from turbinenreiter/patch-2Damien George
updated to use new pyb.Accel() object
2014-05-04updated to use new pyb.Accel() objectSebastian Plamauer
2014-05-04Merge pull request #561 from turbinenreiter/patch-1Damien George
updated to fit new acceleration and time/millis
2014-05-04updated to fit new acceleration and time/millisSebastian Plamauer
Changed pyb.accel() and pyb.time() to the new pyb.Accel() object and pyb.millis() function. Also shortened the loop so the writing is finished before the USB connection messes things up.
2014-05-04tools: In build-stm-latest, replace git hash with git tag.Damien George