Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Matrix calculation causes memory usage to jump

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50533] Matrix calculation causes memory usage to jump
  • From: rze90bdsv02 at sneakemail.com (Alexander Vorobiev)
  • Date: Thu, 9 Sep 2004 05:18:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm having memory usage problem with the following expression:

res = (Plus @@ (MapThread[#1.#2 &, {weights, priceTr}]))/100. //
                 Chop[#, 10^-7] & // Transpose;

Dimensions of {weights,priceTr} are {{9, 1000, 7}, {9, 7, 4022}} so
that they are 3d 'data cubes' of doubles. When I run the expression,
memory usage jumps 150Mb and more. The result 'res' seems to be too
big as well:

ByteCount[res]/(1024*1024.) --> 76.8517

M = Table[Random[], {4022}, {1000}]; ByteCount[M]/(1024*1024.) -->
30.6855

It it possible to modify the expression to decrease memory usage both
for the calculation and for the result? I don't need any extra
precision, just doubles.

Thanks,
Alex Vorobiev


  • Prev by Date: Re: Can't get graph to display when using ImplicitPlot!
  • Next by Date: Log[4]==2*Log[2]
  • Previous by thread: Re: NestList
  • Next by thread: Log[4]==2*Log[2]