shithub: aacenc

ref: fc2a0b223565a46e642d762e659e2c589624eb13
dir: /profiling.txt/

View raw version
PROFILING RESULTS
-----------------

This is an attempt to cronolog all the profiles done to the code, and the speed at which teh code runs after steps have been taken to optimize it. Think of it  as a diary.

NOTE: After ever optmiztion and code change, md5sum MUST be run on the output   files to determine that they are exact matches of teh pre-optimized code.       PLEASE remember to do this, it'll save alot of heartache in the future.
Also please dont include any Flat data that is less than 1% of the total time.

Also NOTE: All tests are run at the DEFAULT encoder settings, ie, faac track.wav

Format:
*Person profiling
*Version/cvs date
*gcc flags
*runtime
*data track used
*notes
*FLAT gprof profile. We may include the Call graph at a later date if we need   to.

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 11:04:16 CST 2000
-O6 -march=i686 -funroll-loops -finline-functions -fomit-frame-pointer
10 min, 47.88 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
This is the default fully optimized non profiled compile on my box.
NO PROFILE DATA

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 11:04:16 CST 2000
-O6 -march=i686 -funroll-loops -finline-functions -g -pg -a
11 min, 12.98 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
This is the default fully optimized, profiled compile on my box.
Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  us/call  us/call  name    
 58.80    385.25   385.25    41048  9385.35  9385.35  psy_step6
  3.92    410.93    25.68    41048   625.61   625.61  psy_step14
  3.91    436.53    25.60    41048   623.66   623.66  psy_step11andahalf
  3.72    460.87    24.34    20524  1185.93  1787.90  psy_step2
  3.01    480.59    19.72    20524   960.83  2928.46  tf_encode_spectrum_aac
  2.53    497.14    16.55    41048   403.19 13119.15  EncTf_psycho_acoustic
  2.17    511.39    14.25    19506   730.54   730.54  estimate_delay
  2.13    525.32    13.93    20524   678.72   678.72  psy_step4
  2.02    538.53    13.21 22839582     0.58     0.61  output_bits
  1.40    547.73     9.20    41104   223.82   223.98  calc_noise
  1.17    555.37     7.64    41048   186.12   186.12  psy_step9
  1.09    562.53     7.16 42029056     0.17     0.17  double_to_int

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 13:00:03 CST 2000
-O6 -march=i686 -funroll-loops -finline-functions -fomit-frame-pointer
10 min, 44.19 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
New fully Optimized non profile with a macroized double_to_int.

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 13:00:03 CST 2000
-O6 -march=i686 -funroll-loops -finline-functions -g -pg -a
11 min, 5.36 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Fully optimized, Profiled with macroized double_to_int. Notice no double_to_int in the top 1% of the flat profile.
Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  us/call  us/call  name    
 58.99    385.02   385.02    41048  9379.75  9379.75  psy_step6
  3.94    410.71    25.69    41048   625.85   625.85  psy_step11andahalf
  3.91    436.24    25.53    20524  1243.91  1822.18  psy_step2
  3.83    461.23    24.99    41048   608.80   608.80  psy_step14
  3.06    481.23    20.00    20524   974.47  2941.86  tf_encode_spectrum_aac
  2.47    497.37    16.14    41048   393.20 13116.31  EncTf_psycho_acoustic
  2.19    511.64    14.27    20524   695.28   695.28  psy_step4
  2.10    525.36    13.72    19506   703.37   703.37  estimate_delay
  2.06    538.82    13.46 22839582     0.59     0.62  output_bits
  1.35    547.63     8.81    41104   214.33   215.15  calc_noise
  1.19    555.37     7.74    41048   188.56   188.56  psy_step9
  1.04    562.15     6.78    20524   330.34   597.84  nok_ltp_reconstruct

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-finline-functions 
5 min, 38.96 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Ok, this is wierd. It jsut dawned on me that since the x86 isnt a risc box with a ton of registers (like im used to) it might be register starved. That seems to be the case. With no optimization except inlining, we are running with a 200% speed increase. Time to pin this down.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-O -finline-function
11 min, 6.09 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Looks like -O is still starving registers.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
No Optimization
5 min, 39.84 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
a bit slower than the non inlined version.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-march=i686 -finline-functions
5 min, 38.25 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Still Not getting anywhere.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-march=i686 -finline-functions -funroll-loops
5 min, 37.04 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
More Nothing.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-march=i686 -finline-functions -funroll-loops -fomit-frame-pointer
5 min, 39.46 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Still Nothing.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
 -march=i686 -finline-functions -funroll-loops -fomit-frame-pointer -fthread-jumps
5 min, 41.00 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Still Nothing.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-march=i686 -finline-functions -funroll-loops -fomit-frame-pointer -fthread-jumps -fdefer-pop
5 min, 42.24 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Still Nothing.
NO PROFILE

------------------------------------------------------------------------------
thebard
CVS Tue Feb 22 19:18:25 CST 2000
-O6 -march=i686 -finline-functions -funroll-loops -fomit-frame-pointer -ffast-math
3 min, 12.13 sec.
The Outfield Bangin': track 2: Bangin' On My Heart
Bingo! Got it. -O core dumps, and -O2 to -O6 are slower than thuer non optimized counterparts, unless you add -ffast-math. then things are speedy. The assembly it produces still has room for speed. Still more work to do.