<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/map.c, branch 2.2.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.2.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-07-31T08:35:40+00:00</updated>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>py/map: Fix bugs with deletion of elements from OrderedDict.</title>
<updated>2017-03-03T00:21:19+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-03T00:21:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9275c182708ae80ac62eaf0e4152df7b88163076'/>
<id>urn:sha1:9275c182708ae80ac62eaf0e4152df7b88163076</id>
<content type='text'>
There were 2 bugs, now fixed by this patch:
- after deleting an element the len of the dict did not decrease by 1
- after deleting an element searching through the dict could lead to
  a seg fault due to there being an MP_OBJ_SENTINEL in the ordered array
</content>
</entry>
<entry>
<title>py/map: Change mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-08T00:00:15+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-08T00:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=af622eb2a6aa50429eb64716e754ee58c3f87c2e'/>
<id>urn:sha1:af622eb2a6aa50429eb64716e754ee58c3f87c2e</id>
<content type='text'>
The internal map/set functions now use size_t exclusively for computing
addresses.  size_t is enough to reach all of available memory when
computing addresses so is the right type to use.  In particular, for
nanbox builds it saves quite a bit of code size and RAM compared to the
original use of mp_uint_t (which is 64-bits on nanbox builds).
</content>
</entry>
<entry>
<title>py: Declare constant data as properly constant.</title>
<updated>2016-05-20T11:46:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-20T11:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3ff16ff52e45d4c0bf1df5fa650b72d6d835451b'/>
<id>urn:sha1:3ff16ff52e45d4c0bf1df5fa650b72d6d835451b</id>
<content type='text'>
Otherwise some compilers (eg without optimisation) will put this read-only
data in RAM instead of ROM.
</content>
</entry>
<entry>
<title>py/map: Change hash-table allocation policy to be less aggressive.</title>
<updated>2016-04-15T15:24:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-04-15T15:24:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=00137b8c11eb94bbf97d5276d9c4e879ea75fb1d'/>
<id>urn:sha1:00137b8c11eb94bbf97d5276d9c4e879ea75fb1d</id>
<content type='text'>
Small hash tables (eg those used in user class instances that only have a
few members) now only use the minimum amount of memory necessary to hold
the key/value pairs.  This can reduce performance for instances that have
many members (because then there are many reallocations/rehashings of the
table), but helps to conserve memory.

See issue #1760.
</content>
</entry>
<entry>
<title>py/map: Prevent map resize failure from destroying map.</title>
<updated>2016-04-01T13:36:00+00:00</updated>
<author>
<name>Stephen Kyle</name>
<email>stephen.kyle@arm.com</email>
</author>
<published>2016-04-01T09:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b475327ffa24a95d9855b9ed38cdd8fe13487f4d'/>
<id>urn:sha1:b475327ffa24a95d9855b9ed38cdd8fe13487f4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/map: In map lookup, check for fixed map independent of ordered map.</title>
<updated>2015-12-31T00:24:33+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-31T00:19:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6dde019d933175b5c2608b8da2239846e1730838'/>
<id>urn:sha1:6dde019d933175b5c2608b8da2239846e1730838</id>
<content type='text'>
It's possible to have a fixed map that is properly hashed (ie not
simply ordered).
</content>
</entry>
<entry>
<title>py/map: Add fast-path for hashing of map index when it is a qstr.</title>
<updated>2015-12-26T21:15:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-26T21:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bbe8d51bd9ab0c848ee833000dcc93eb78bcbcad'/>
<id>urn:sha1:bbe8d51bd9ab0c848ee833000dcc93eb78bcbcad</id>
<content type='text'>
Map indicies are most commonly a qstr, and adding a fast-path for hashing
of a qstr increases overall performance of the runtime.

On pyboard there is a 4% improvement in the pystone benchmark for a cost
of 20 bytes of code size.  It's about a 2% improvement on unix.
</content>
</entry>
<entry>
<title>py: Use MP_OBJ_NULL instead of NULL when appropriate.</title>
<updated>2015-11-20T14:09:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-20T14:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=83229d3ffe5f8b6ba9c9f90e4ff0185dc0bab81b'/>
<id>urn:sha1:83229d3ffe5f8b6ba9c9f90e4ff0185dc0bab81b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/map: Store key/value in earliest possible slot in hash table.</title>
<updated>2015-11-19T01:27:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-19T01:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=593faf14c4700afd6c2ba6a281e7d48633e4d688'/>
<id>urn:sha1:593faf14c4700afd6c2ba6a281e7d48633e4d688</id>
<content type='text'>
This change makes the code behave how it was supposed to work when first
written.  The avail_slot variable is set to the first free slot when
looking for a key (which would come from deleting an entry).  So it's
more efficient (for subsequent lookups) to insert a new key into such a
slot, rather than the very last slot that was searched.
</content>
</entry>
</feed>
