[Tutor] Which is better in principle: to store (in file) calculated data or to re-calculate it upon restarting program?
boB Stepp
robertvstepp at gmail.com
Tue Jul 30 13:20:23 EDT 2019
On Tue, Jul 30, 2019 at 12:05 PM Zachary Ware
<zachary.ware+pytut at gmail.com> wrote:
>
> On Tue, Jul 30, 2019 at 11:24 AM boB Stepp <robertvstepp at gmail.com> wrote:
> > In this trivial example I cannot imagine there is any realistic
> > difference between the two approaches, but I am trying to generalize
> > my thoughts for potentially much more expensive calculations, very
> > large data sets, and what is the likelihood of storage errors
> > occurring in files. Any thoughts on this?
>
> As with many things in programming, it comes down to how much time you
> want to trade for space. If you have a lot of space and not much
> time, store the calculated values. If you have a lot of time (or the
> calculation time is negligible) and not much space, recalculate every
> time. If you have plenty of both, store it and recalculate it anyway
What is the likelihood of file storage corruption? I have a vague
sense that in earlier days of computing this was more likely to
happen, but nowadays? Storing and recalculating does act as a good
data integrity check of the file data.
--
boB
More information about the Tutor
mailing list