avatar
help -- matlab acceleration# Programming - 葵花宝典
a*m
1
I have to use MC for 1e+9 runs to get the required accuracy. It roughly
takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming.
I wonder if there are ways to accelerate matlab runs.
1. I heard about compiling matlab m file into execution file that can
operate at a speed similar to C. I am not sure how to do it.
2. I can try other MC methods, for example, control variate etc. Assume I
have a control variate that I know the true value, how do I use it to
accelerate MC speed?
An
avatar
l*g
2
1. read help of matlab, it's all there
2. let matlab manage your variable memory, unless it is global.

.

【在 a***m 的大作中提到】
: I have to use MC for 1e+9 runs to get the required accuracy. It roughly
: takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming.
: I wonder if there are ways to accelerate matlab runs.
: 1. I heard about compiling matlab m file into execution file that can
: operate at a speed similar to C. I am not sure how to do it.
: 2. I can try other MC methods, for example, control variate etc. Assume I
: have a control variate that I know the true value, how do I use it to
: accelerate MC speed?
: An

avatar
k*f
3
升级机器最省事了。

.

【在 a***m 的大作中提到】
: I have to use MC for 1e+9 runs to get the required accuracy. It roughly
: takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming.
: I wonder if there are ways to accelerate matlab runs.
: 1. I heard about compiling matlab m file into execution file that can
: operate at a speed similar to C. I am not sure how to do it.
: 2. I can try other MC methods, for example, control variate etc. Assume I
: have a control variate that I know the true value, how do I use it to
: accelerate MC speed?
: An

avatar
k*f
4
The improvement you can achieve by compiling to C code depends on your
original code. It could be large, or little.
Alternatively, you may wan to use the matlab profiler to find out the
bottleneck of your code. Often you'll find inefficient code that holds your
simulation speed. Then do some optimization to speed it up.
Good luck.
avatar
I*r
5
put all your big loops in C. search mex+matlab for help.

.

【在 a***m 的大作中提到】
: I have to use MC for 1e+9 runs to get the required accuracy. It roughly
: takes 1000/2/60 = 7-8 hours to get a set of result.It's too time consuming.
: I wonder if there are ways to accelerate matlab runs.
: 1. I heard about compiling matlab m file into execution file that can
: operate at a speed similar to C. I am not sure how to do it.
: 2. I can try other MC methods, for example, control variate etc. Assume I
: have a control variate that I know the true value, how do I use it to
: accelerate MC speed?
: An

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。