Re: [Sqlalchemy-tickets] [sqlalchemy] #2720: new C extensions for attribute accessing
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-05-08 02:47:54
|
#2720: new C extensions for attribute accessing
-----------------------------------+---------------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: enhancement | Status: new
Priority: medium | Milestone: 0.9.0
Component: cextensions | Severity: very major - up to 2 days
Resolution: | Keywords:
Progress State: not decided upon |
-----------------------------------+---------------------------------------
Comment (by zzzeek):
so the speed savings are:
1. the comparison of `self->cached_instance_dict == instance_dict ` and
such are straight C references, so this is extremely fast, then
2. `rv = PyObject_GetItem(basic_dict, key);` allows us to quickly get a
value or NULL without the overhead of either "key in dict" or catching an
expensive `KeyError`
is that right?
also did you run any regular timeit's? I'm assuming we'd see similar
percentages.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2720#comment:14>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|