classification
Title: remove unnecessary operation in long_compare()
Type: Stage: patch review
Components: Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Ma Lin
Priority: normal Keywords: patch, patch, patch

Created on 2019-01-09 09:26 by Ma Lin, last changed 2019-01-09 09:27 by Ma Lin.

Pull Requests
URL Status Linked Edit
PR 11473 closed Ma Lin, 2019-01-09 09:27
PR 11473 closed Ma Lin, 2019-01-09 09:27
PR 11473 closed Ma Lin, 2019-01-09 09:27
Messages (1)
msg333293 - (view) Author: Ma Lin (Ma Lin) * Date: 2019-01-09 09:26
static int
long_compare(PyLongObject *a, PyLongObject *b)
{
    ....
}

This function in /Objects/longobject.c is used to compare two PyLongObject's value.
We only need the sign, converting to -1 or +1 is not necessary.
History
Date User Action Args
2019-01-09 09:27:45Ma Linsetkeywords: + patch
stage: patch review
pull_requests: + pull_request10976
2019-01-09 09:27:41Ma Linsetkeywords: + patch
stage: (no value)
pull_requests: + pull_request10975
2019-01-09 09:27:33Ma Linsetkeywords: + patch
stage: (no value)
pull_requests: + pull_request10974
2019-01-09 09:26:39Ma Lincreate