Opened 11 years ago

#6101 new Bugs

overhead with creating multi_array_ref with GCC 3.4.6

Reported by: Maxim Yanchenko <Maxim.Yanchenko@…> Owned by: Ronald Garcia
Milestone: To Be Determined Component: multi_array
Version: Boost 1.47.0 Severity: Optimization
Keywords: Cc:

Description

We spotted this with profiler and had to switch from boost::const_multi_array_ref to just std:pair of pointers.

GCC 3.4.6 generates huge code for this primitive function (to represent a raw pointer as a 1D-array), comparing to GCC 4.4.4:

boost::const_multi_array_ref<int,1>
make(const int* begin, const boost::array<int,1>& size)
{
  return boost::const_multi_array_ref<int,1>(begin, size);
}

The generated code and compilation options are attached.

Attachments (2)

34 (15.4 KB ) - added by Maxim Yanchenko <Maxim.Yanchenko@…> 11 years ago.
gcc 3.4.6
44 (1.7 KB ) - added by Maxim Yanchenko <Maxim.Yanchenko@…> 11 years ago.
gcc 4.4.4

Download all attachments as: .zip

Change History (2)

by Maxim Yanchenko <Maxim.Yanchenko@…>, 11 years ago

Attachment: 34 added

gcc 3.4.6

by Maxim Yanchenko <Maxim.Yanchenko@…>, 11 years ago

Attachment: 44 added

gcc 4.4.4

Note: See TracTickets for help on using tickets.