
Signature
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com
Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott said on 31/12/2008 00:58:
> Beyond this, my understanding is that I need to identify the most often-
> called functions and write them in C (I'm already doing this for another
> project, so I know how). Is this it? Does Scilab have any profiling
> tools to help me decide what functions to flog first?
Yes. But read further.
> I'd love it if I
> could print out a report that said what percent of the processor's time
> was spent in which function -- is there any way to extract this
> information, and if so how?
help profile in Scilab 4.1.2 will spit three matches, all related to
profiling Scilab code. In Scilab 4.1.2, the function has to be
prepared for profiling by getf(...,"p"). In Scilab 5 you can use
add_profiling and similar commands (see their help page).
Beware of the bugs that profiling functions suffer from...
http://bugzilla.scilab.org/buglist.cgi?short_desc_type=allwordssubstr&short_desc
=profile&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED
IMO some of these bugs unfortunately just turn these functions into
useless curiosities, for instance see:
http://bugzilla.scilab.org/show_bug.cgi?id=3816#c1
Francois
ycollet - 31 Dec 2008 09:40 GMT
A stupid way to accelerate your code, if you use scilab-5 in gui mode.
If you print a lot of message in the scilab console, clear the console
from time to time or launch your code in nw mode (scilab -nw under
linux or Scilex under windows).
Scilab-5 in GUI mode slows down as the console gets full of message
(there is no limit in the size of the message history in GUI mode, in
NW under windows the size of the history is several tenth of lines).
YC