| Commit message (Collapse) | Author | Age |
|
|
|
| |
Based on python-dev discussion regarding PEP467.
|
| |
|
|
|
|
|
|
| |
- remove single string initialization style
- take list of strings instead
- store list in the type for fast lookup
|
| |
|
|
|
|
|
| |
map() is 5 times slower. That's mostly because of inefficiency of creating
containers from iterables of unknown length (like map()).
|
|
|
|
|
|
| |
Both "bound" (like, length known) and "unbound" (length unknown) are tested.
All of list, tuple, bytes, bytesarray offer approximately the same
performance, with "unbound" case being 30 times slower.
|
|
|
|
|
| |
For a trivial operation, calling a function is 5 times slower than doing
operation inline.
|
|
|
|
|
| |
Inspired by discussion in #577. So, in this case of builtin function,
passing args by keyword has less than 1% overhead.
|
|
|
|
|
| |
Passing 3 args with keywords is for example 50% slower than via positional
args.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
... 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.
|
|
|
|
| |
That's higher than instance field access - behold the power of hashing.
|
|
|
|
|
| |
Also compared with method abstraction for accessing instance vars -
it's more than 3 times slower than accessing var directly.
|
|
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.
|