Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
zan zan is offline
external usenet poster
 
Posts: 6
Default with SP2, has the rand() function been slowed down ?

I have a spreadsheet in which I do some Monte Carlo simulations and use the
rand() function in around 350000 cells. Before upgrading to excel 2003/SP2,
this sheet would calculate in around 20 seconds. After the "upgrade" it now
runs in around 90 seconds. Is there any way for me to recoup the speed
without going back to the old configuration ? Why the slowdown ?
  #2   Report Post  
Posted to microsoft.public.excel.misc
zan zan is offline
external usenet poster
 
Posts: 6
Default with SP2, has the rand() function been slowed down ?

Actually, the formula I am using is : normsinv(rand()), so the slowdown could
be caused by normsinv as well.

"zan" wrote:

I have a spreadsheet in which I do some Monte Carlo simulations and use the
rand() function in around 350000 cells. Before upgrading to excel 2003/SP2,
this sheet would calculate in around 20 seconds. After the "upgrade" it now
runs in around 90 seconds. Is there any way for me to recoup the speed
without going back to the old configuration ? Why the slowdown ?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 762
Default with SP2, has the rand() function been slowed down ?

zan -

The slowdown is most likely due to the increased precision of the normal
inverse function in Excel 2003.

There are Knowledge Base articles at www.microsoft.com describing some of
the changes. The improvements in precision require more calculations.

Instead of using Excel's normal inverse function, you could substitute some
VBA code using the well-documented Box-Muller method for obtaining normal
random numbers. Search groups.google.com for examples.

Or, download the tryout version of my RiskSim add-in, available from
www.treeplan.com, and use its RandNormal function.

- Mike
www.mikemiddleton.com

"zan" wrote in message
...
Actually, the formula I am using is : normsinv(rand()), so the slowdown
could
be caused by normsinv as well.

"zan" wrote:

I have a spreadsheet in which I do some Monte Carlo simulations and use
the
rand() function in around 350000 cells. Before upgrading to excel
2003/SP2,
this sheet would calculate in around 20 seconds. After the "upgrade" it
now
runs in around 90 seconds. Is there any way for me to recoup the speed
without going back to the old configuration ? Why the slowdown ?



  #4   Report Post  
Posted to microsoft.public.excel.misc
zan zan is offline
external usenet poster
 
Posts: 6
Default with SP2, has the rand() function been slowed down ?

Thanks Mike - I implemented Box-Muller and now it calcs in about 5 seconds,
which is entirely acceptable. I will also check out your tools.

"Mike Middleton" wrote:

zan -

The slowdown is most likely due to the increased precision of the normal
inverse function in Excel 2003.

There are Knowledge Base articles at www.microsoft.com describing some of
the changes. The improvements in precision require more calculations.

Instead of using Excel's normal inverse function, you could substitute some
VBA code using the well-documented Box-Muller method for obtaining normal
random numbers. Search groups.google.com for examples.

Or, download the tryout version of my RiskSim add-in, available from
www.treeplan.com, and use its RandNormal function.

- Mike
www.mikemiddleton.com

"zan" wrote in message
...
Actually, the formula I am using is : normsinv(rand()), so the slowdown
could
be caused by normsinv as well.

"zan" wrote:

I have a spreadsheet in which I do some Monte Carlo simulations and use
the
rand() function in around 350000 cells. Before upgrading to excel
2003/SP2,
this sheet would calculate in around 20 seconds. After the "upgrade" it
now
runs in around 90 seconds. Is there any way for me to recoup the speed
without going back to the old configuration ? Why the slowdown ?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"