Open mkoeppe opened 2 years ago
here's a beginning (untested)
Last 10 new commits:
ebd3b77 | Better pygments style |
73e5aa3 | Make white logo transparent to match with furo |
523b49a | Merge branch 'u/klee/34252' of git://trac.sagemath.org/sage into t/32181/realset__faster_operations_by_scan_line__merging__techniques |
a864fdc | fix typo |
3f6a0ac | revive RealSet.normalize |
79f2014 | revise the docstring of RealSet.is_connected |
1ef7dd1 | remove unnecessary bool() |
a856e5d | Merge #32181 |
6998c22 | Merge #34277 |
cf5d8f1 | src/sage/sets/real_set.py (RealSet_base): New, not UniqueRepresentation |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
c97b9f7 | change RealSet(...) constructor to self.__class__(...) |
42f4dd6 | Use self.__class__.__base__ in methods when constructing a new RealSet |
6cf8c27 | Merge #34277 |
6ed8f48 | src/sage/sets/real_set.py (RealSet_base): New, not UniqueRepresentation |
Rebased on new version of #34277
Branch pushed to git repo; I updated commit sha1. New commits:
9085e2e | src/sage/sets/real_set.py: Use self.METHOD, cls.METHOD instead of RealSet.METHOD; use super() |
Branch pushed to git repo; I updated commit sha1. New commits:
2c87c44 | src/sage/sets/real_set.py: Make normalize a @classmethod |
Branch pushed to git repo; I updated commit sha1. New commits:
d6dd265 | src/sage/sets/real_set.py (RealSet_base.__init__): Check normalized |
Branch pushed to git repo; I updated commit sha1. New commits:
d25aaac | WIP cache=False |
Can you give some more explanation why you want to do this? While this should not be an issue with coercion (equal-but-not-identical-parents are often a source of frustration there), it increases the overall code complexity.
When algorithms create lots of RealSet
s as intermediate objects, we don't want them to persist in memory for the remainder of the session
But now I realize the premise is wrong - CachedRepresentation
/UniqueRepresentation
use WeakCachedFunction
, so it does not actually pin the objects into memory
Indeed, it is a weak cache. However, if this needs to be done in a tight loop, the extra overhead of checking and maintaining the cache might matter. To the profiler!
When receiving
cache=False
, this would use an implementation class that does not inherit fromUniqueRepresentation
to avoid persistence in memory.Depends on #34277 Depends on #32181
CC: @yuan-zhou @tscrim
Component: basic arithmetic
Branch/Commit: u/mkoeppe/realset__add_option_cache_false @
d25aaac
Issue created by migration from https://trac.sagemath.org/ticket/34278