Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
software:deep:rts:donts [2013-04-04 10:19] – graf | software:deep:rts:donts [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Do's and Don'ts ====== | ||
- | Java is a very powerful programming language and offers a large and complex library. Only a small subset of the standard library is supported on the target to keep a small memory footprint and maintain a high performance. | ||
- | ===== Don't use longs if not absolutely necessary ===== | ||
- | The type long consists of 8 bytes and cannot be handled by the 32-bit architecture directly. Though all manipulations of this type are handled correctly by our compiler it is less efficient than working with 32 bit types where all basic calculations can be done in one clock cycle. | ||
- | |||
- | ===== Do reuse objects ===== | ||
- | Make sure that you reuse ojects! That is particularly necessary for fast control application. In such cases it's advisable to instantiate all objects needed in an initalization section. These objects will then be reused. This practice ensures that the runtime behaviour of a control task is minimal and predictable. It also makes garbage collection obsolete. | ||
- | |||
- | ===== Use interrupts carefully ===== | ||
- | Generally speaking interrupts should not be used by an application. Use tasks to meet certain timing requirements. Interrupts can be and are in fact used by low-level drivers e.g. for serial communication. |