[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks good catch :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Mark Dickinson
Mark Dickinson added the comment: @shihai1991 Good catch! Now fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread Mark Dickinson
Change by Mark Dickinson : -- pull_requests: +17687 pull_request: https://github.com/python/cpython/pull/18311 ___ Python tracker ___

[issue39434] Remove unnecessary logic of float __floordiv__

2020-02-02 Thread hai shi
hai shi added the comment: Small style question: using 5 spaces in https://github.com/python/cpython/blob/master/Objects/floatobject.c#L655-L664 after PR 18147 merged. Due to bpo don't receive style quesiton, I commented here. -- nosy: +shihai1991

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: Victor: I suspect there's some compiler magic going on, too; a good compiler should be able to figure out that half of the div/mod calculation is not being used, and strip it out. That wouldn't have been possible before with the tuple packing and unpacking.

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-30 Thread STINNER Victor
STINNER Victor added the comment: Thanks, that's a nice optimization! I'm surprised that creating a tuple of 2 items, get one item directly into the C structure, and destroy the tuple is so slow (360 ns => 185 ns: 175 ns less). With my FASTCALL optimization on function calls, I recall that

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: Thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 8d49f7ceb4f961770ae61fe6a4033c4e61cc3288 by Dong-hee Na in branch 'master': bpo-39434: Improve float __floordiv__ performance and error message (GH-18147) https://github.com/python/cpython/commit/8d49f7ceb4f961770ae61fe6a4033c4e61cc3288

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-23 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39434] Remove unnecessary logic of float __floordiv__

2020-01-23 Thread Dong-hee Na
Change by Dong-hee Na : -- title: Add float __floordiv__ fast path -> Remove unnecessary logic of float __floordiv__ ___ Python tracker ___