zzzeek / sqla_issue_test

1 stars 0 forks source link

util.OrderedProperties, util.OrderedDict etc. rewriting with C #216

Closed zzzeek closed 6 years ago

zzzeek commented 18 years ago

Originally reported by: Anonymous


I see you use it frequenly as base types like dict and list.

Probably rewiriting this simle classes using plain C will increase summary performance. If you accordant to me I can rewrite it's myself or charge it to my team.

You can propose another objects to rewrite. Or, please, describe me reason for unimportant effort of this optimization.


zzzeek commented 18 years ago

Original comment by Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek):


this ones falling off the statute of limitations....if you have further ideas on having C-versions of things, please reopen...

zzzeek commented 18 years ago

Original comment by Michael Bayer (Bitbucket: zzzeek, GitHub: zzzeek):


i never want any compilation of C code to be part of a core SQLAlchemy installation; by default its pure python.

If you would like to provide an extension which replaces the OrderedDict/OrderedProperties classes inside the util module with native objects when installed, i may consider having that in a new contrib/ folder.

however, one thing to be careful about optimization is that it is needed and is the appropriate optimization for a particular operation that has been observed to be too slow. Have you identified OrderedProperties and/or OrderedDict as a significant factor in the performance of some function ? do you have a test case I can run with the profiler module ?