I'm profiling a program so that I can optimize it and hopefully get it to run
in real time. Here's
the profile of the program running under Linux:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds secondscalls s/call s/call name
65.94 7.59 7.59 613648 0.00 0.00 tonegenerator::fwaves(int)
11.29 8.89 1.30 613648 0.00 0.00
__gnu_cxx::__enable_ifstd::__is_scalarfloat::__value, float*::__type
std::__fill_n_afloat*,
unsigned int, float(float*, unsigned int, float const)
5.39 9.51 0.62 168385808 0.00 0.00 std::vectorfloat,
std::allocatorfloat
::operator[](unsigned int)
2.78 9.83 0.32 991456 0.00 0.00 std::_Rb_treedouble,
std::pairdouble const,
errec, std::_Select1ststd::pairdouble const, errec , std::lessdouble,
std::allocatorstd::pairdouble const, errec
::_M_lower_bound(std::_Rb_tree_nodestd::pairdouble const, errec const*,
std::_Rb_tree_nodestd::pairdouble const, errec const*, double const) const
2.17 10.08 0.25 15606822 0.00 0.00
std::lessdouble::operator()(double const,
double const) const
1.26 10.22 0.14 613648 0.00 0.00 mastertimer::skip()
1.04 10.35 0.12 14558791 0.00 0.00 std::_Rb_treedouble,
std::pairdouble
const, errec, std::_Select1ststd::pairdouble const, errec ,
std::lessdouble,
std::allocatorstd::pairdouble const, errec
::_S_key(std::_Rb_tree_nodestd::pairdouble const, errec const*)
0.87 10.45 0.10 main
0.52 10.51 0.06 613648 0.00 0.00 tonegenerator::unfwave()
0.48 10.56 0.06 8000250 0.00 0.00
std::_Rb_tree_iteratorstd::pairdouble
const, errec ::operator-() const
0.43 10.61 0.05 999513 0.00 0.00 std::mapdouble, errec,
std::lessdouble,
std::allocatorstd::pairdouble const, errec ::end()
0.43 10.66 0.05 991456 0.00 0.00 std::_Rb_treedouble,
std::pairdouble const,
errec, std::_Select1ststd::pairdouble const, errec , std::lessdouble,
std::allocatorstd::pairdouble const, errec ::find(double const) const
0.43 10.71 0.05 205449 0.00 0.00 downspike()
0.35 10.75 0.04 1227298 0.00 0.00 std::vectorfloat,
std::allocatorfloat
::~vector()
0.35 10.79 0.04 613648 0.00 0.00 std::vectorfloat,
std::allocatorfloat
::vector(std::vectorfloat, std::allocatorfloat const)
0.30 10.82 0.04 1840944 0.00 0.00 parity(unsigned int)
0.26 10.86 0.03 14558791 0.00 0.00 std::_Rb_treedouble,
std::pairdouble
const, errec, std::_Select1ststd::pairdouble const, errec ,
std::lessdouble,
std::allocatorstd::pairdouble const, errec
::_S_value(std::_Rb_tree_nodestd::pairdouble const, errec const*)
0.26 10.88 0.03 2011200 0.00 0.00 std::_Rb_treedouble,
std::pairdouble const,
errec, std::_Select1ststd::pairdouble const, errec , std::lessdouble,
std::allocatorstd::pairdouble const, errec ::end() const
0.26 10.91 0.03 1970656 0.00 0.00
std::_Rb_tree_iteratorstd::pairdouble
const, errec ::operator!=(std::_Rb_tree_iteratorstd::pairdouble const,
errec const)
const
0.26 10.95 0.03 1524715 0.00 0.00 float*
std::__copy_movefalse, true,
std::random_access_iterator_tag::__copy_mfloat(float const*, float const*,
float*)
0.26 10.97 0.03 613648 0.00 0.00 std::vectorfloat,
std::allocatorfloat
::operator=(std::vectorfloat, std::allocatorfloat const)
0.26 11.01 0.0322128 0.00 0.00 compdiv(double)
0.22 11.03 0.03 7046596 0.00 0.00 std::_Rb_treedouble,
std::pairdouble const,
errec, std::_Select1ststd::pairdouble const, errec , std::lessdouble,
std::allocatorstd::pairdouble const, errec
::_S_left(std::_Rb_tree_node_base const*)
0.22 11.05 0.03 5504021 0.00 0.00 std::vectorfloat,
std::allocatorfloat
::size() const
0.17 11.07 0.02 8056834 0.00 0.00 std::pairdouble const,
errec*
std::__addressofstd::pairdouble const, errec (std::pairdouble const,
errec)
0.17 11.10 0.02 1859754 0.00 0.00
__gnu_cxx::__normal_iteratorfloat const*,
std::vectorfloat, std::allocatorfloat ::base() const
0.17 11.12 0.02 1859754 0.00 0.00
std::_Niter_base__gnu_cxx::__normal_iteratorfloat const*, std::vectorfloat,
std::allocatorfloat ::iterator_type
std::__niter_base__gnu_cxx::__normal_iteratorfloat const*, std::vectorfloat,
std::allocatorfloat (__gnu_cxx::__normal_iteratorfloat const*,
std::vectorfloat,
std::allocatorfloat )
0.17 11.13 0.02 1048032 0.00 0.00 std::vectordouble,
std::allocatordouble
::operator[](unsigned int)
0.17 11.15 0.02 613648 0.00 0.00 std::_Vector_basefloat,
std::allocatorfloat