On Thursday, 22 October 2015 10:24:50 UTC+1, Andras Niedermayer wrote: > > You're making a good point about an Array being sometimes faster than a > LinSpace. But a LinSpace gets you a factor N improvement in terms of memory > efficiency for a size N range, an Array only gets you a constant factor > improvement in speed (the factor 15 being admittedly relatively large in > this example). > > Memory efficiency typically matters more for usability in an exploratory > interactive session: if my Julia session needs 5 GB RAM, a factor 3 > increase of memory will crash my computer. If my code runs for 10 seconds > in an interactive session, 30 seconds is mildly annoying, but not a deal > breaker. (Obviously, you can construct different examples with memory/time > where this is different. But my point is that inconvenience changes > discontinuously in memory usage.) >
In my domain (PDEs and related), memory usage is hardly ever an issue for one-dimensional arrays (as in I cannot for the life of me think of a case where it is). I don't know about other domains of course. Christoph