MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Betriebsanweisung Seite 182

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 274
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 181
6 Optimizing Performance
6-6
Optimizing Loops
Simple Indexing
(array_indexing) This optimization improves the performance of simple one-
and two-dimensional array index expressions. Without this optimization, all
array indexing uses the fully general array indexing function, which is not
optimized for one- and two-dimensional indexing. With this optimization
enabled, indexing uses faster routines that are optimized for simple indexing.
For example:
function y = test(x,i1,i2);
y = x(i1,i2);
If you compile this with the -O none option, you get
...
mlfAssign(
&y,
mlfIndexRef(mclVa(x, "x"), "(?,?)", mclVa(i1, "i1"),
mclVa(i2, "i2")));
...
Compiling with -O none -O array_indexing:on gives
...
mlfAssign(
&y, mclArrayRef2(mclVa(x, "x"), mclVa(i1, "i1"),
mclVa(i2,"i2")));
...
The mclArrayRef2 function is optimized for two-dimensional indexing.
mclArrayRef1 is used for one-dimensional indexing.
Loop Simplification
(optimize_integer_for_loops) This optimization detects when a loop starts
and increments with integers. It replaces the loop with a much simpler loop
that uses C integer variables instead of array-valued variables. The
performance improvements with this optimization can be dramatic.
Seitenansicht 181
1 2 ... 177 178 179 180 181 182 183 184 185 186 187 ... 273 274

Kommentare zu diesen Handbüchern

Keine Kommentare

ENERGY SISTEM Lecteurs de médias numériques manuels d'utilisation

À partir de T

Cliquez sur un alphabet ci-dessous pour faire défiler la liste complète des modèles commençant par cette lettre

Modèles Type de document
T5250
Manuel de l'utilisateur   Energy Sistem T5250, 30 pages
T5850 HDTV
Manuel de l'utilisateur   Energy Sistem T5850 HDTV, 22 pages