由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - MATLAB function call too slow
相关主题
help -- matlab acceleration请教一个concurrentlinkedqueue的用法问题
How to use the online code source? ---- A general questioncin 进入 bad state后咋恢复呢? clear()没用
c 语言 查 memory请教pthread producer-consumer问题
给大家出个多进程的题求教一个Java问题 IllegalMonitorStateException
read matlab .mat file, by C++???盲?肓?
关于regular expressionaspect programing 就是 functional programing吗?
How to put a perl script to run from a web site?现在082KAFKA支持produce数组吗
一个JAVA程序请教创建kafka consumer的stop函数
相关话题的讨论汇总
话题: function话题: time话题: slow话题: matlab话题: after
进入Programming版参与讨论
1 (共1页)
i***w
发帖数: 9
1
After I profiled my programe, I found that the most time consuming part (
self time) in a function f(...) is something like this:
[A,B,C]= g(x,A,B,C);
I'm wondering why this statement will be slow? Since it's self time of f(...
),
it's not the time within function g(...). Does this mean the time is
consumed in copying matrix parameters A,B,C ? How can I improve the
speed? Thanks a lot.
s****y
发帖数: 2052
2
use C....

..

【在 i***w 的大作中提到】
: After I profiled my programe, I found that the most time consuming part (
: self time) in a function f(...) is something like this:
: [A,B,C]= g(x,A,B,C);
: I'm wondering why this statement will be slow? Since it's self time of f(...
: ),
: it's not the time within function g(...). Does this mean the time is
: consumed in copying matrix parameters A,B,C ? How can I improve the
: speed? Thanks a lot.

s******r
发帖数: 350
3
Global variables
n*****d
发帖数: 956
4
You may need to look inside the function. For example, if you have a number
of nested 'for', 'while' loops, it's bound to be slow. Change those into
matrix operations if you can.
Rewriting it in C is a good idea, if speed is an issue. I got a nonlinear
filter function running at least 20 times faster after rewritting it in C.

【在 s****y 的大作中提到】
: use C....
:
: ..

1 (共1页)
进入Programming版参与讨论
相关主题
创建kafka consumer的stop函数read matlab .mat file, by C++???
java producer consumer problem (转载)关于regular expression
Re: java producer consumer problem (转载)How to put a perl script to run from a web site?
急招湾区Android高手加盟startup一个JAVA程序请教
help -- matlab acceleration请教一个concurrentlinkedqueue的用法问题
How to use the online code source? ---- A general questioncin 进入 bad state后咋恢复呢? clear()没用
c 语言 查 memory请教pthread producer-consumer问题
给大家出个多进程的题求教一个Java问题 IllegalMonitorStateException
相关话题的讨论汇总
话题: function话题: time话题: slow话题: matlab话题: after