[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread STINNER Victor
STINNER Victor added the comment: > Shouldn't this be applied to 3.3? It's just a cleanup, it doesn't fix any real bug. I prefer to not pollute old versions with cleanup. > As for optimization, I made some benchmarks and didn't saw any significant > difference. Usually this function used to ch

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't this be applied to 3.3? As for optimization, I made some benchmarks and didn't saw any significant difference. Usually this function used to check short ASCII heads and tails and any optimization will not be seen even under a microscope. -

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-02 Thread STINNER Victor
STINNER Victor added the comment: "Here I see a one obvious opportunity for optimization: ..." @Serhiy: Can you please open a new issue for this? I consider the issue as fixed: I just removed the TODO (for the reason explained in the changeset). --

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49eb2488145d by Victor Stinner in branch 'default': Close #16281: handle tailmatch() failure and remove useless comment http://hg.python.org/cpython/rev/49eb2488145d -- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: >> Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function >> can fail. > > But it does. > > .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ > Py_ssize_t start, Py_ssize_t end, int direction) >

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function > can fail. But it does. .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ Py_ssize_t start, Py_ssize_t end, int direction) Return

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function can fail. -- ___ Python tracker ___ _

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The result does not depend on the direction of comparison. This only affects speed. But who can to say in which direction comparison will be faster? Here I see a one obvious opportunity for optimization: if (kind_self < kind_sub) return 0; After

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-10-18 Thread STINNER Victor
New submission from STINNER Victor: Oh oh, it looks like the implementation of tailmatch() was not finished: /* If both are of the same kind, memcmp is sufficient */ if (kind_self == kind_sub) { return ...; } /* otherwise we have to compare each charac