Opened 7 years ago

Closed 7 years ago

#4474 closed defect (fixed)

inefficient list() comprehension

Reported by: hkiel Owned by: sjoelund.se
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 Changed 7 years ago by sjoelund.se

  • Milestone changed from Future to 1.12.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed with PR1755.

Note: See TracTickets for help on using tickets.