You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Netlist-based Compilation will generate excessive amounts of boolean variables with names like _g119 or _cg105. In generated Java code, each of these variables is declared a public boolean. While the amount of memory occupied by a public boolean variable is jvm specific, I doubt that many implementations will actually use less than one byte per boolean. As there are platforms with strict limits on the number of permitted fields (like the NXJ/leJOS platform) it might be sensible to try to combine these booleans for example into one java.util.BitSet.
Some of these generated fields may actually be redundant. (As in: are set to the same value a few codelines apart in which the value is not mutated and the values are not mutated at all.) These fields could probably be removed entirely without changing the program execution.
The text was updated successfully, but these errors were encountered:
That is a good suggestion.
The NXTs are always a bit problematic due to their variable limitation but you are right there is optimization potential in the code generation.
The
Netlist-based Compilation
will generate excessive amounts of boolean variables with names like_g119
or_cg105
. In generated Java code, each of these variables is declared apublic boolean
. While the amount of memory occupied by apublic boolean
variable is jvm specific, I doubt that many implementations will actually use less than one byte per boolean. As there are platforms with strict limits on the number of permitted fields (like the NXJ/leJOS platform) it might be sensible to try to combine these booleans for example into onejava.util.BitSet
.Some of these generated fields may actually be redundant. (As in: are set to the same value a few codelines apart in which the value is not mutated and the values are not mutated at all.) These fields could probably be removed entirely without changing the program execution.
The text was updated successfully, but these errors were encountered: