New submission from Serhiy Storchaka <storch...@gmail.com>: Now a string kind declared in different places of code as `enum PyUnicode_Kind`, `int` or `unsigned int`. Working on the codecs optimization, I noticed that sometimes the use of `enum PyUnicode_Kind` gives a little advantage over the use of int's. Probably this hint allows compiler to better utilize the optimizer. The proposed patch replaces all string kind's declarations of local variables and private functions to `enum PyUnicode_Kind`. If this will not impact significantly on the performance, then at least the unification will enhance the readability and will allow to avoid some of the errors (missing switch cases).
---------- components: Interpreter Core files: enum_PyUnicode_Kind.patch keywords: patch messages: 163043 nosy: storchaka priority: normal severity: normal status: open title: Using enum PyUnicode_Kind type: performance versions: Python 3.3 Added file: http://bugs.python.org/file26033/enum_PyUnicode_Kind.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15092> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com