Opened 7 years ago

Closed 7 years ago

#4474 closed defect (fixed)

inefficient list() comprehension

Reported by: Henning Kiel Owned by: Martin Sjölund
Priority: high Milestone: 1.12.0
Component: MetaModelica Version:
Keywords: Cc:

Description

In ExpandableArray.toList() there is a line

listT := list(Util.getOption(data[i]) for i guard isSome(data[i]) in 1:capacity);

where the range is really created in the compiled C-code

create_integer_array_from_range(&tmp4, ((modelica_integer) 1), 1, (modelica_integer)_capacity);

instead of using a for loop. This is insane in speed and memory.

Change History (1)

comment:1 by Martin Sjölund, 7 years ago

Milestone: Future1.12.0
Resolution: fixed
Status: newclosed

Fixed with PR1755.

Note: See TracTickets for help on using tickets.