Opened 3 years ago

Closed 3 years ago

#27343 closed enhancement (fixed)

py3: various tiny fixes

Reported by: chapoton Owned by:
Priority: major Milestone: sage-8.7
Component: python3 Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: b879777 (Commits, GitHub, GitLab) Commit: b879777fdcccc73e9fea5700865d28b72fcbfbe1
Dependencies: Stopgaps:

Status badges

Description


Change History (5)

comment:1 Changed 3 years ago by chapoton

  • Branch set to u/chapoton/27343
  • Commit set to b6a4f4272c4e24f244342f933e3c279b90f7524d
  • Status changed from new to needs_review

New commits:

b6a4f42py3: other various fixes in combinat, doctest, dynamics

comment:2 Changed 3 years ago by tscrim

  • Reviewers set to Travis Scrimshaw

LGTM except (somewhat strangely) tuple([foo for for in bar]) is faster than tuple(foo for foo in bar):

sage: %timeit tuple([i for i in range(10)])
1000000 loops, best of 3: 798 ns per loop
sage: %timeit tuple(i for i in range(10))
1000000 loops, best of 3: 1.24 µs per loop

sage: %timeit tuple([i for i in range(1000)])
10000 loops, best of 3: 30.1 µs per loop
sage: %timeit tuple(i for i in range(1000))
10000 loops, best of 3: 39.9 µs per loop

sage: %timeit tuple([i for i in range(100000)])
100 loops, best of 3: 3.95 ms per loop
sage: %timeit tuple(i for i in range(100000))
100 loops, best of 3: 4.62 ms per loop

So please revert those changes and then you can set a positive review on my behalf.

comment:3 Changed 3 years ago by git

  • Commit changed from b6a4f4272c4e24f244342f933e3c279b90f7524d to b879777fdcccc73e9fea5700865d28b72fcbfbe1

Branch pushed to git repo; I updated commit sha1. New commits:

b879777trac 27343 undo tuple cleanup (for speed reasons)

comment:4 Changed 3 years ago by chapoton

  • Status changed from needs_review to positive_review

ok, done. Maybe speed should later also be compared with python3..

Setting to positive

comment:5 Changed 3 years ago by vbraun

  • Branch changed from u/chapoton/27343 to b879777fdcccc73e9fea5700865d28b72fcbfbe1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.