← Back to list

Running gprof

Original version ran 43.25 1.44 1.44 267082717 0.00 0.00 GammaApproximation

Kibicho Murage · 2023-01-07 13:53 · 0 claps · 13.6 min read
#gprof
Open on Medium ↗
Wiki topics: 🥊 · Combat Sports 🏃 · Running & Endurance

Running gprof

  1. Original version ran 43.25 1.44 1.44 267082717 0.00 0.00 GammaApproximation
  2. New version ran 0.00 1.07 0.00 386629 0.00 0.00 GammaApproximation

New — improved FindLargestNLogarithm and GammaApproximation

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 41.15      0.44     0.44  4950781     0.00     0.00  AddBinary
 30.86      0.77     0.33        1   330.23   330.23  GenerateLookupTable
 22.45      1.01     0.24   525189     0.00     0.00  BinaryAdd
  0.94      1.02     0.01    25000     0.00     0.00  BinaryArrayLog
  0.94      1.03     0.01    25000     0.00     0.00  BinarySubtract
  0.94      1.04     0.01    25000     0.00     0.00  FindLargestNLogarithm
  0.94      1.05     0.01     5000     0.00     0.00  PrintIntArray
  0.94      1.06     0.01     5000     0.00     0.00  TestConversionSuccess
  0.94      1.07     0.01        1    10.01   450.31  OpenFile
  0.00      1.07     0.00   386629     0.00     0.00  GammaApproximation
  0.00      1.07     0.00    79999     0.00     0.00  DecimalToBinary
  0.00      1.07     0.00    74998     0.00     0.00  FindLeadingZeros
  0.00      1.07     0.00    74998     0.00     0.00  FindPrimeFactorsAndDivide
  0.00      1.07     0.00    74998     0.00     0.00  Multiply
  0.00      1.07     0.00    74998     0.00     0.00  ReverseCopy
  0.00      1.07     0.00    25000     0.00     0.01  CreateBinomial
  0.00      1.07     0.00    25000     0.00     0.00  DestroyBinomial
  0.00      1.07     0.00    25000     0.00     0.01  NumeratorToBinary
  0.00      1.07     0.00     5000     0.00     0.06  BinomialTransform
  0.00      1.07     0.00     5000     0.00     0.00  HolderInsertArray
  0.00      1.07     0.00        5     0.00     0.00  CreatePermutation
  0.00      1.07     0.00        5     0.00     0.00  DestroyPermutation
  0.00      1.07     0.00        1     0.00     0.00  CloseFiles
  0.00      1.07     0.00        1     0.00     0.00  CreateAll
  0.00      1.07     0.00        1     0.00     0.00  CreateFile
  0.00      1.07     0.00        1     0.00     0.00  CreateHolder
  0.00      1.07     0.00        1     0.00     0.00  DestroyHolder
  0.00      1.07     0.00        1     0.00     0.00  DestroyList
  0.00      1.07     0.00        1     0.00   620.43  ProcessFile

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.

 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
    else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this
    function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
    the function in the gprof listing. If the index is
    in parenthesis it shows where it would appear in
    the gprof listing if it were to be printed.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

       Call graph (explanation follows)

granularity: each sample hit covers 2 byte(s) for 0.93% of 1.07 seconds

index % time    self  children    called     name
                                                 <spontaneous>
[1]    100.0    0.00    1.07                 main [1]
                0.00    0.62       1/1           ProcessFile [2]
                0.01    0.44       1/1           OpenFile [3]
-----------------------------------------------
                0.00    0.62       1/1           main [1]
[2]     57.9    0.00    0.62       1         ProcessFile [2]
                0.33    0.00       1/1           GenerateLookupTable [5]
                0.00    0.28    5000/5000        BinomialTransform [6]
                0.01    0.00    5000/5000        PrintIntArray [14]
                0.00    0.00    5000/5000        HolderInsertArray [22]
                0.00    0.00       1/1           CreateFile [27]
                0.00    0.00       1/1           CreateHolder [28]
                0.00    0.00       1/1           DestroyHolder [29]
                0.00    0.00       1/1           CloseFiles [25]
-----------------------------------------------
                0.01    0.44       1/1           main [1]
[3]     42.1    0.01    0.44       1         OpenFile [3]
                0.44    0.00 4950781/4950781     AddBinary [4]
-----------------------------------------------
                0.44    0.00 4950781/4950781     OpenFile [3]
[4]     41.1    0.44    0.00 4950781         AddBinary [4]
-----------------------------------------------
                0.33    0.00       1/1           ProcessFile [2]
[5]     30.8    0.33    0.00       1         GenerateLookupTable [5]
-----------------------------------------------
                0.00    0.28    5000/5000        ProcessFile [2]
[6]     26.2    0.00    0.28    5000         BinomialTransform [6]
                0.00    0.24   25000/25000       CreateBinomial [9]
                0.01    0.00   25000/25000       BinaryArrayLog [11]
                0.01    0.00   25000/25000       FindLargestNLogarithm [13]
                0.01    0.00   25000/25000       BinarySubtract [12]
                0.01    0.00    5000/5000        TestConversionSuccess [15]
                0.00    0.00   25000/25000       DestroyBinomial [21]
                0.00    0.00    5000/79999       DecimalToBinary [17]
-----------------------------------------------
                0.24    0.00  525189/525189      Multiply [8]
[7]     22.4    0.24    0.00  525189         BinaryAdd [7]
-----------------------------------------------
                0.00    0.24   74998/74998       NumeratorToBinary [10]
[8]     22.4    0.00    0.24   74998         Multiply [8]
                0.24    0.00  525189/525189      BinaryAdd [7]
                0.00    0.00   74998/74998       FindLeadingZeros [18]
-----------------------------------------------
                0.00    0.24   25000/25000       BinomialTransform [6]
[9]     22.4    0.00    0.24   25000         CreateBinomial [9]
                0.00    0.24   25000/25000       NumeratorToBinary [10]
                0.00    0.00   74998/74998       FindPrimeFactorsAndDivide [19]
-----------------------------------------------
                0.00    0.24   25000/25000       CreateBinomial [9]
[10]    22.4    0.00    0.24   25000         NumeratorToBinary [10]
                0.00    0.24   74998/74998       Multiply [8]
                0.00    0.00   74999/79999       DecimalToBinary [17]
                0.00    0.00   74998/74998       ReverseCopy [20]
                0.00    0.00   24999/386629      GammaApproximation [16]
-----------------------------------------------
                0.01    0.00   25000/25000       BinomialTransform [6]
[11]     0.9    0.01    0.00   25000         BinaryArrayLog [11]
-----------------------------------------------
                0.01    0.00   25000/25000       BinomialTransform [6]
[12]     0.9    0.01    0.00   25000         BinarySubtract [12]
-----------------------------------------------
                0.01    0.00   25000/25000       BinomialTransform [6]
[13]     0.9    0.01    0.00   25000         FindLargestNLogarithm [13]
                0.00    0.00  361630/386629      GammaApproximation [16]
-----------------------------------------------
                0.01    0.00    5000/5000        ProcessFile [2]
[14]     0.9    0.01    0.00    5000         PrintIntArray [14]
-----------------------------------------------
                0.01    0.00    5000/5000        BinomialTransform [6]
[15]     0.9    0.01    0.00    5000         TestConversionSuccess [15]
-----------------------------------------------
                0.00    0.00   24999/386629      NumeratorToBinary [10]
                0.00    0.00  361630/386629      FindLargestNLogarithm [13]
[16]     0.0    0.00    0.00  386629         GammaApproximation [16]
-----------------------------------------------
                0.00    0.00    5000/79999       BinomialTransform [6]
                0.00    0.00   74999/79999       NumeratorToBinary [10]
[17]     0.0    0.00    0.00   79999         DecimalToBinary [17]
-----------------------------------------------
                0.00    0.00   74998/74998       Multiply [8]
[18]     0.0    0.00    0.00   74998         FindLeadingZeros [18]
-----------------------------------------------
                0.00    0.00   74998/74998       CreateBinomial [9]
[19]     0.0    0.00    0.00   74998         FindPrimeFactorsAndDivide [19]
-----------------------------------------------
                0.00    0.00   74998/74998       NumeratorToBinary [10]
[20]     0.0    0.00    0.00   74998         ReverseCopy [20]
-----------------------------------------------
                0.00    0.00   25000/25000       BinomialTransform [6]
[21]     0.0    0.00    0.00   25000         DestroyBinomial [21]
-----------------------------------------------
                0.00    0.00    5000/5000        ProcessFile [2]
[22]     0.0    0.00    0.00    5000         HolderInsertArray [22]
-----------------------------------------------
                0.00    0.00       5/5           CreateHolder [28]
[23]     0.0    0.00    0.00       5         CreatePermutation [23]
-----------------------------------------------
                0.00    0.00       5/5           DestroyHolder [29]
[24]     0.0    0.00    0.00       5         DestroyPermutation [24]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[25]     0.0    0.00    0.00       1         CloseFiles [25]
-----------------------------------------------
                0.00    0.00       1/1           CreateHolder [28]
[26]     0.0    0.00    0.00       1         CreateAll [26]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[27]     0.0    0.00    0.00       1         CreateFile [27]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[28]     0.0    0.00    0.00       1         CreateHolder [28]
                0.00    0.00       5/5           CreatePermutation [23]
                0.00    0.00       1/1           CreateAll [26]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[29]     0.0    0.00    0.00       1         DestroyHolder [29]
                0.00    0.00       5/5           DestroyPermutation [24]
                0.00    0.00       1/1           DestroyList [30]
-----------------------------------------------
                0.00    0.00       1/1           DestroyHolder [29]
[30]     0.0    0.00    0.00       1         DestroyList [30]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index A unique number given to each element of the table.
  Index numbers are sorted numerically.
  The index number is printed next to every function name so
  it is easier to look up where the function is in the table.

     % time This is the percentage of the `total' time that was spent
  in this function and its children.  Note that due to
  different viewpoints, functions excluded by options, etc,
  these numbers will NOT add up to 100%.

     self This is the total amount of time spent in this function.

     children This is the total amount of time propagated into this
  function by its children.

     called This is the number of times the function was called.
  If the function called itself recursively, the number
  only includes non-recursive calls, and is followed by
  a `+' and the number of recursive calls.

     name The name of the current function.  The index number is
  printed after it.  If the function is a member of a
  cycle, the cycle number is printed between the
  function's name and the index number.

 For the function's parents, the fields have the following meanings:

     self This is the amount of time that was propagated directly
  from the function into this parent.

     children This is the amount of time that was propagated from
  the function's children into this parent.

     called This is the number of times this parent called the
  function `/' the total number of times the function
  was called.  Recursive calls to the function are not
  included in the number after the `/'.

     name This is the name of the parent.  The parent's index
  number is printed after it.  If the parent is a
  member of a cycle, the cycle number is printed between
  the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self This is the amount of time that was propagated directly
  from the child into the function.

     children This is the amount of time that was propagated from the
  child's children to the function.

     called This is the number of times the function called
  this child `/' the total number of times the child
  was called.  Recursive calls by the child are not
  listed in the number after the `/'.

     name This is the name of the child.  The child's index
  number is printed after it.  If the child is a
  member of a cycle, the cycle number is printed
  between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

Index by function name

   [4] AddBinary              [23] CreatePermutation       [5] GenerateLookupTable
   [7] BinaryAdd              [17] DecimalToBinary        [22] HolderInsertArray
  [11] BinaryArrayLog         [21] DestroyBinomial         [8] Multiply
  [12] BinarySubtract         [29] DestroyHolder          [10] NumeratorToBinary
   [6] BinomialTransform      [30] DestroyList             [3] OpenFile
  [25] CloseFiles             [24] DestroyPermutation     [14] PrintIntArray
  [26] CreateAll              [13] FindLargestNLogarithm   [2] ProcessFile
   [9] CreateBinomial         [18] FindLeadingZeros       [20] ReverseCopy
  [27] CreateFile             [19] FindPrimeFactorsAndDivide [15] TestConversionSuccess
  [28] CreateHolder           [16] GammaApproximation

Original — lots of time in FindLargestNLogarithm and GammaApproximation

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls   s/call   s/call  name    
 43.25      1.44     1.44 267082717     0.00     0.00  GammaApproximation
 28.48      2.38     0.95    25000     0.00     0.00  FindLargestNLogarithm
 10.25      2.72     0.34  4950781     0.00     0.00  AddBinary
  8.14      2.99     0.27        1     0.27     0.27  GenerateLookupTable
  5.12      3.16     0.17   525193     0.00     0.00  BinaryAdd
  2.71      3.25     0.09    25000     0.00     0.00  BinaryArrayLog
  0.60      3.27     0.02    74999     0.00     0.00  Multiply
  0.60      3.29     0.02    74999     0.00     0.00  ReverseCopy
  0.60      3.31     0.02        1     0.02     0.36  OpenFile
  0.30      3.32     0.01                             SingleReduction2
  0.00      3.32     0.00    79999     0.00     0.00  DecimalToBinary
  0.00      3.32     0.00    74999     0.00     0.00  FindLeadingZeros
  0.00      3.32     0.00    74999     0.00     0.00  FindPrimeFactorsAndDivide
  0.00      3.32     0.00    25000     0.00     0.00  BinarySubtract
  0.00      3.32     0.00    25000     0.00     0.00  CreateBinomial
  0.00      3.32     0.00    25000     0.00     0.00  DestroyBinomial
  0.00      3.32     0.00    25000     0.00     0.00  NumeratorToBinary
  0.00      3.32     0.00    10000     0.00     0.00  PrintPermutation
  0.00      3.32     0.00    10000     0.00     0.00  SetIndex
  0.00      3.32     0.00    10000     0.00     0.00  SingleReduction
  0.00      3.32     0.00     5000     0.00     0.00  BinomialTransform
  0.00      3.32     0.00     5000     0.00     0.00  HolderInsertArray
  0.00      3.32     0.00     5000     0.00     0.00  TestConversionSuccess
  0.00      3.32     0.00     2000     0.00     0.00  PrintHolder
  0.00      3.32     0.00     2000     0.00     0.00  ReduceHolder
  0.00      3.32     0.00     1000     0.00     0.00  CheckFree
  0.00      3.32     0.00     1000     0.00     0.00  EncodeHolder
  0.00      3.32     0.00     1000     0.00     0.00  PrintIntArray
  0.00      3.32     0.00     1000     0.00     0.00  ResetCounter
  0.00      3.32     0.00     1000     0.00     0.00  SingleDerivative
  0.00      3.32     0.00     1000     0.00     0.00  SingleIntegral
  0.00      3.32     0.00        5     0.00     0.00  CreatePermutation
  0.00      3.32     0.00        5     0.00     0.00  DestroyPermutation
  0.00      3.32     0.00        1     0.00     0.00  CloseFiles
  0.00      3.32     0.00        1     0.00     0.00  CreateAll
  0.00      3.32     0.00        1     0.00     0.00  CreateFile
  0.00      3.32     0.00        1     0.00     0.00  CreateHolder
  0.00      3.32     0.00        1     0.00     0.00  DestroyHolder
  0.00      3.32     0.00        1     0.00     0.00  DestroyList
  0.00      3.32     0.00        1     0.00     2.95  ProcessFile

 %         the percentage of the total running time of the
time       program used by this function.

cumulative a running sum of the number of seconds accounted
 seconds   for by this function and those listed above it.

 self      the number of seconds accounted for by this
seconds    function alone.  This is the major sort for this
           listing.

calls      the number of times this function was invoked, if
           this function is profiled, else blank.

 self      the average number of milliseconds spent in this
ms/call    function per call, if this function is profiled,
    else blank.

 total     the average number of milliseconds spent in this
ms/call    function and its descendents per call, if this
    function is profiled, else blank.

name       the name of the function.  This is the minor sort
           for this listing. The index shows the location of
    the function in the gprof listing. If the index is
    in parenthesis it shows where it would appear in
    the gprof listing if it were to be printed.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

       Call graph (explanation follows)

granularity: each sample hit covers 2 byte(s) for 0.30% of 3.32 seconds

index % time    self  children    called     name
                                                 <spontaneous>
[1]     99.7    0.00    3.31                 main [1]
                0.00    2.95       1/1           ProcessFile [2]
                0.02    0.34       1/1           OpenFile [6]
-----------------------------------------------
                0.00    2.95       1/1           main [1]
[2]     88.9    0.00    2.95       1         ProcessFile [2]
                0.00    2.68    5000/5000        BinomialTransform [3]
                0.27    0.00       1/1           GenerateLookupTable [8]
                0.00    0.00    5000/5000        HolderInsertArray [24]
                0.00    0.00    1000/1000        EncodeHolder [29]
                0.00    0.00       1/1           CreateFile [38]
                0.00    0.00       1/1           CreateHolder [39]
                0.00    0.00       1/1           DestroyHolder [40]
                0.00    0.00       1/1           CloseFiles [36]
-----------------------------------------------
                0.00    2.68    5000/5000        ProcessFile [2]
[3]     80.7    0.00    2.68    5000         BinomialTransform [3]
                0.95    1.44   25000/25000       FindLargestNLogarithm [4]
                0.00    0.21   25000/25000       CreateBinomial [9]
                0.09    0.00   25000/25000       BinaryArrayLog [13]
                0.00    0.00   25000/25000       BinarySubtract [19]
                0.00    0.00   25000/25000       DestroyBinomial [20]
                0.00    0.00    5000/79999       DecimalToBinary [16]
                0.00    0.00    5000/5000        TestConversionSuccess [25]
-----------------------------------------------
                0.95    1.44   25000/25000       BinomialTransform [3]
[4]     71.7    0.95    1.44   25000         FindLargestNLogarithm [4]
                1.44    0.00 267057717/267082717     GammaApproximation [5]
-----------------------------------------------
                0.00    0.00   25000/267082717     NumeratorToBinary [10]
                1.44    0.00 267057717/267082717     FindLargestNLogarithm [4]
[5]     43.2    1.44    0.00 267082717         GammaApproximation [5]
-----------------------------------------------
                0.02    0.34       1/1           main [1]
[6]     10.8    0.02    0.34       1         OpenFile [6]
                0.34    0.00 4950781/4950781     AddBinary [7]
-----------------------------------------------
                0.34    0.00 4950781/4950781     OpenFile [6]
[7]     10.2    0.34    0.00 4950781         AddBinary [7]
-----------------------------------------------
                0.27    0.00       1/1           ProcessFile [2]
[8]      8.1    0.27    0.00       1         GenerateLookupTable [8]
-----------------------------------------------
                0.00    0.21   25000/25000       BinomialTransform [3]
[9]      6.3    0.00    0.21   25000         CreateBinomial [9]
                0.00    0.21   25000/25000       NumeratorToBinary [10]
                0.00    0.00   74999/74999       FindPrimeFactorsAndDivide [18]
-----------------------------------------------
                0.00    0.21   25000/25000       CreateBinomial [9]
[10]     6.3    0.00    0.21   25000         NumeratorToBinary [10]
                0.02    0.17   74999/74999       Multiply [11]
                0.02    0.00   74999/74999       ReverseCopy [14]
                0.00    0.00   25000/267082717     GammaApproximation [5]
                0.00    0.00   74999/79999       DecimalToBinary [16]
-----------------------------------------------
                0.02    0.17   74999/74999       NumeratorToBinary [10]
[11]     5.7    0.02    0.17   74999         Multiply [11]
                0.17    0.00  525193/525193      BinaryAdd [12]
                0.00    0.00   74999/74999       FindLeadingZeros [17]
-----------------------------------------------
                0.17    0.00  525193/525193      Multiply [11]
[12]     5.1    0.17    0.00  525193         BinaryAdd [12]
-----------------------------------------------
                0.09    0.00   25000/25000       BinomialTransform [3]
[13]     2.7    0.09    0.00   25000         BinaryArrayLog [13]
-----------------------------------------------
                0.02    0.00   74999/74999       NumeratorToBinary [10]
[14]     0.6    0.02    0.00   74999         ReverseCopy [14]
-----------------------------------------------
                                                 <spontaneous>
[15]     0.3    0.01    0.00                 SingleReduction2 [15]
-----------------------------------------------
                0.00    0.00    5000/79999       BinomialTransform [3]
                0.00    0.00   74999/79999       NumeratorToBinary [10]
[16]     0.0    0.00    0.00   79999         DecimalToBinary [16]
-----------------------------------------------
                0.00    0.00   74999/74999       Multiply [11]
[17]     0.0    0.00    0.00   74999         FindLeadingZeros [17]
-----------------------------------------------
                0.00    0.00   74999/74999       CreateBinomial [9]
[18]     0.0    0.00    0.00   74999         FindPrimeFactorsAndDivide [18]
-----------------------------------------------
                0.00    0.00   25000/25000       BinomialTransform [3]
[19]     0.0    0.00    0.00   25000         BinarySubtract [19]
-----------------------------------------------
                0.00    0.00   25000/25000       BinomialTransform [3]
[20]     0.0    0.00    0.00   25000         DestroyBinomial [20]
-----------------------------------------------
                0.00    0.00   10000/10000       PrintHolder [26]
[21]     0.0    0.00    0.00   10000         PrintPermutation [21]
-----------------------------------------------
                0.00    0.00   10000/10000       SingleDerivative [32]
[22]     0.0    0.00    0.00   10000         SetIndex [22]
-----------------------------------------------
                0.00    0.00   10000/10000       ReduceHolder [27]
[23]     0.0    0.00    0.00   10000         SingleReduction [23]
-----------------------------------------------
                0.00    0.00    5000/5000        ProcessFile [2]
[24]     0.0    0.00    0.00    5000         HolderInsertArray [24]
-----------------------------------------------
                0.00    0.00    5000/5000        BinomialTransform [3]
[25]     0.0    0.00    0.00    5000         TestConversionSuccess [25]
-----------------------------------------------
                0.00    0.00    2000/2000        EncodeHolder [29]
[26]     0.0    0.00    0.00    2000         PrintHolder [26]
                0.00    0.00   10000/10000       PrintPermutation [21]
-----------------------------------------------
                0.00    0.00    2000/2000        EncodeHolder [29]
[27]     0.0    0.00    0.00    2000         ReduceHolder [27]
                0.00    0.00   10000/10000       SingleReduction [23]
-----------------------------------------------
                0.00    0.00    1000/1000        EncodeHolder [29]
[28]     0.0    0.00    0.00    1000         CheckFree [28]
-----------------------------------------------
                0.00    0.00    1000/1000        ProcessFile [2]
[29]     0.0    0.00    0.00    1000         EncodeHolder [29]
                0.00    0.00    2000/2000        ReduceHolder [27]
                0.00    0.00    2000/2000        PrintHolder [26]
                0.00    0.00    1000/1000        ResetCounter [31]
                0.00    0.00    1000/1000        SingleDerivative [32]
                0.00    0.00    1000/1000        PrintIntArray [30]
                0.00    0.00    1000/1000        CheckFree [28]
                0.00    0.00    1000/1000        SingleIntegral [33]
-----------------------------------------------
                0.00    0.00    1000/1000        EncodeHolder [29]
[30]     0.0    0.00    0.00    1000         PrintIntArray [30]
-----------------------------------------------
                0.00    0.00    1000/1000        EncodeHolder [29]
[31]     0.0    0.00    0.00    1000         ResetCounter [31]
-----------------------------------------------
                0.00    0.00    1000/1000        EncodeHolder [29]
[32]     0.0    0.00    0.00    1000         SingleDerivative [32]
                0.00    0.00   10000/10000       SetIndex [22]
-----------------------------------------------
                0.00    0.00    1000/1000        EncodeHolder [29]
[33]     0.0    0.00    0.00    1000         SingleIntegral [33]
-----------------------------------------------
                0.00    0.00       5/5           CreateHolder [39]
[34]     0.0    0.00    0.00       5         CreatePermutation [34]
-----------------------------------------------
                0.00    0.00       5/5           DestroyHolder [40]
[35]     0.0    0.00    0.00       5         DestroyPermutation [35]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[36]     0.0    0.00    0.00       1         CloseFiles [36]
-----------------------------------------------
                0.00    0.00       1/1           CreateHolder [39]
[37]     0.0    0.00    0.00       1         CreateAll [37]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[38]     0.0    0.00    0.00       1         CreateFile [38]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[39]     0.0    0.00    0.00       1         CreateHolder [39]
                0.00    0.00       5/5           CreatePermutation [34]
                0.00    0.00       1/1           CreateAll [37]
-----------------------------------------------
                0.00    0.00       1/1           ProcessFile [2]
[40]     0.0    0.00    0.00       1         DestroyHolder [40]
                0.00    0.00       5/5           DestroyPermutation [35]
                0.00    0.00       1/1           DestroyList [41]
-----------------------------------------------
                0.00    0.00       1/1           DestroyHolder [40]
[41]     0.0    0.00    0.00       1         DestroyList [41]
-----------------------------------------------

 This table describes the call tree of the program, and was sorted by
 the total amount of time spent in each function and its children.

 Each entry in this table consists of several lines.  The line with the
 index number at the left hand margin lists the current function.
 The lines above it list the functions that called this function,
 and the lines below it list the functions this one called.
 This line lists:
     index A unique number given to each element of the table.
  Index numbers are sorted numerically.
  The index number is printed next to every function name so
  it is easier to look up where the function is in the table.

     % time This is the percentage of the `total' time that was spent
  in this function and its children.  Note that due to
  different viewpoints, functions excluded by options, etc,
  these numbers will NOT add up to 100%.

     self This is the total amount of time spent in this function.

     children This is the total amount of time propagated into this
  function by its children.

     called This is the number of times the function was called.
  If the function called itself recursively, the number
  only includes non-recursive calls, and is followed by
  a `+' and the number of recursive calls.

     name The name of the current function.  The index number is
  printed after it.  If the function is a member of a
  cycle, the cycle number is printed between the
  function's name and the index number.

 For the function's parents, the fields have the following meanings:

     self This is the amount of time that was propagated directly
  from the function into this parent.

     children This is the amount of time that was propagated from
  the function's children into this parent.

     called This is the number of times this parent called the
  function `/' the total number of times the function
  was called.  Recursive calls to the function are not
  included in the number after the `/'.

     name This is the name of the parent.  The parent's index
  number is printed after it.  If the parent is a
  member of a cycle, the cycle number is printed between
  the name and the index number.

 If the parents of the function cannot be determined, the word
 `<spontaneous>' is printed in the `name' field, and all the other
 fields are blank.

 For the function's children, the fields have the following meanings:

     self This is the amount of time that was propagated directly
  from the child into the function.

     children This is the amount of time that was propagated from the
  child's children to the function.

     called This is the number of times the function called
  this child `/' the total number of times the child
  was called.  Recursive calls by the child are not
  listed in the number after the `/'.

     name This is the name of the child.  The child's index
  number is printed after it.  If the child is a
  member of a cycle, the cycle number is printed
  between the name and the index number.

 If there are any cycles (circles) in the call graph, there is an
 entry for the cycle-as-a-whole.  This entry shows who called the
 cycle (as parents) and the members of the cycle (as children.)
 The `+' recursive calls entry shows the number of function calls that
 were internal to the cycle, and the calls entry for each member shows,
 for that member, how many times it was called from other members of
 the cycle.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.

Index by function name

   [7] AddBinary              [40] DestroyHolder          [30] PrintIntArray
  [12] BinaryAdd              [41] DestroyList            [21] PrintPermutation
  [13] BinaryArrayLog         [35] DestroyPermutation      [2] ProcessFile
  [19] BinarySubtract         [29] EncodeHolder           [27] ReduceHolder
   [3] BinomialTransform       [4] FindLargestNLogarithm  [31] ResetCounter
  [28] CheckFree              [17] FindLeadingZeros       [14] ReverseCopy
  [36] CloseFiles             [18] FindPrimeFactorsAndDivide [22] SetIndex
  [37] CreateAll               [5] GammaApproximation     [32] SingleDerivative
   [9] CreateBinomial          [8] GenerateLookupTable    [33] SingleIntegral
  [38] CreateFile             [24] HolderInsertArray      [23] SingleReduction
  [39] CreateHolder           [11] Multiply               [15] SingleReduction2
  [34] CreatePermutation      [10] NumeratorToBinary      [25] TestConversionSuccess
  [16] DecimalToBinary         [6] OpenFile
  [20] DestroyBinomial        [26] PrintHolder

메타데이터
post_id
635d8f28f8a8
slug
running-gprof-635d8f28f8a8
url
https://medium.com/@kibichomurage/running-gprof-635d8f28f8a8
canonical_url
https://medium.com/@kibichomurage/running-gprof-635d8f28f8a8
author_url
https://medium.com/@kibichomurage
status
ok
fetched_at
2026-06-29 22:44:20