add_profiling not add_profile
[scilab.git] / scilab / modules / core / help / en_US / comp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry version="5.0-subset Scilab" xml:id="comp" xml:lang="en"
3           xmlns="http://docbook.org/ns/docbook"
4           xmlns:xlink="http://www.w3.org/1999/xlink"
5           xmlns:svg="http://www.w3.org/2000/svg"
6           xmlns:ns3="http://www.w3.org/1999/xhtml"
7           xmlns:mml="http://www.w3.org/1998/Math/MathML"
8           xmlns:db="http://docbook.org/ns/docbook">
9   <info>
10     <pubdate>$LastChangedDate: 2008-03-26 08:50:39 +0000 (mer, 26 mar 2008)
11     $</pubdate>
12   </info>
13
14   <refnamediv>
15     <refname>comp</refname>
16
17     <refpurpose>scilab function compilation</refpurpose>
18   </refnamediv>
19
20   <refsynopsisdiv>
21     <title>Calling Sequence</title>
22
23     <synopsis>comp(function [,opt])</synopsis>
24   </refsynopsisdiv>
25
26   <refsection>
27     <title>Parameters</title>
28
29     <variablelist>
30       <varlistentry>
31         <term>function</term>
32
33         <listitem>
34           <para>a scilab function, not compiled (type 11)</para>
35         </listitem>
36       </varlistentry>
37
38       <varlistentry>
39         <term>opt</term>
40
41         <listitem>
42           <para>flag with value 0 (default), 1 or 2.</para>
43         </listitem>
44       </varlistentry>
45     </variablelist>
46   </refsection>
47
48   <refsection>
49     <title>Description</title>
50
51     <para><literal>comp(function)</literal> compiles the function
52     <literal>function</literal>. Compiled and interpreted functions are
53     equivalent but usually compiled functions are much faster. The functions
54     provided in the standard libraries are compiled.</para>
55
56     <para>The online definition as well as the short syntax of the commands
57     <literal>getf</literal> and <literal>deff</literal> generate compiled
58     functions. So comp has to be used in very particular cases. To produce
59     uncompiled functions one must use ><link linkend="getf">getf</link> or
60     <link linkend="deff">deff</link> with the option <literal>"n"</literal>.</para>
61
62     <para>The value opt==2 causes the function to be compiled "for profiling".
63     Note that now it is possible to add profiling instruction after
64     compilation using the <link linkend="add_profiling">add_profiling</link> function.</para>
65
66     <para>The osolete opt==1 option was specific to code analysis purposes and
67     is now ignored, i.e treated as opt==0.</para>
68
69     <para>Note: the compilation takes part "in place", i.e the original
70     function is modified and no new object is created.</para>
71   </refsection>
72
73   <refsection>
74     <title>See Also</title>
75
76     <simplelist type="inline">
77       <member><link linkend="type">type</link></member>
78
79       <member><link linkend="deff">deff</link></member>
80
81       <member><link linkend="getf">getf</link></member>
82
83       <member><link linkend="function">function</link></member>
84      <member><link linkend="add_profiling">add_profiling</link></member>
85       <member><link linkend="profile">profile</link></member>
86     </simplelist>
87   </refsection>
88 </refentry>