Questions and Thoughts
-
Forum:
Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re:
Project step #5, deadline Monday 2 December (Mike O'Donnell)
Date: 2002, Nov 28
From: Mark Kittisopikul <markkitt@uchicago.edu>
|
I starting thinking about how to do this and it was not quite what I thought it was, but here is what's been going on in my head for the last couple minutes:
- When does the caching occur? My guess is that it occurs first when the first precision is requested (when the lambda expression is invoked with a given precision).
- How is the cache stored? When I contemplated this one, I immediately thought of the "counter" example (not counter as in against, but as in something that increments a number) that O'Donnell showed us (I can't find an example of this in the notes...). In some way, the procedure almost feels like an object in that it has a "property". I believe the idea is that a lambda expression captures the environment it was closed in... so then we must define the cache variable in the environment that it was closed in and not the top-level (global) environment.
- Does the xreal created from rational->xreal need any caching? The answer seems to be no because the rational interval that it returns should be the best possible rational interval. In a sense, this xreal is already "cached".
- Should "higher-level" xreals (xreals that depend on other xreals to compute) cache or should they depend on the cache of their subordinate cache? Well not propogating precision requests seems like a good benefit of caching. So we need to cache for things like add_xreal and mult_xreal
Disclamer: These are just my thoughts. They might not be right. In a way, I'm asking for confirmation of my thoughts.
|
Messages
- 1.
My response thoughts... by Benedict Singer, 2002, Nov 28
-
- 1.
Untitled by Mark Kittisopikul, 2002, Nov 29
- (_
Iteration and caching... by Benedict Singer, 2002, Nov 29
- 2.
Sketch of a design for cached precision functions by Mike O'Donnell, 2002, Nov 29
-
- 1.
Response by Mark Kittisopikul, 2002, Nov 29
-
- 1.
Initial interval happens only once, extra test happens for every invocation of xreal by Mike O'Donnell, 2002, Nov 29
- ...
3 Message(s)
- 2.
I'm considering code to create the cache and code to use it separately by Mike O'Donnell, 2002, Nov 29
- ...
1 Message(s)
- 3.
Cacheing (make_ratintvl r r) in (rational->xreal) makes sense to me by Mike O'Donnell, 2002, Nov 29
- 2.
define vs let by Mark Kittisopikul, 2002, Nov 29
-
- 1.
Internal define and let appear to be the same by Mike O'Donnell, 2002, Nov 29
- 3.
Accessing the cache by Mark Kittisopikul, 2002, Nov 29
-
- 1.
A debugging command to return cache contents is a great idea by Mike O'Donnell, 2002, Nov 29
- 2.
Debugging thought... by Benedict Singer, 2002, Nov 29
to: "Questions and Thoughts"